Page MenuHomePhabricator

[BUG] Improve the template parameter guessing
Closed, ResolvedPublic3 Estimated Story Points


Reported by @TheDJ on the project talk page:

When you try inserting the template "Infobox officeholder", you'll note that the parser trips over interpreting the parameter names due to parserfunctions. It results in fields names like: "minority{{#if:{{{minorityleader2"

image.png (1×1 px, 146 KB)

The regex that we use to guess parameters should be tweaked to adjust to this use case.

This ticket could probably use more technical fleshing out. From a product standpoint, the aim of this ticket is to weed out as many bad guesses from the list as possible.

Event Timeline

Niharika triaged this task as Medium priority.Sep 5 2018, 8:47 PM
Niharika created this task.
aezell set the point value for this task to 3.Sep 5 2018, 11:30 PM
aezell moved this task from To Be Estimated/Discussed to Estimated on the Community-Tech board.

One thing we can do is increase the parameter-finding to avoid {{{#, because that's never the start of a valid parameter name.

I think that catches the errors reported here (this was with this template wasn't it?) but there are constructs like this that don't work:


It doesn't find party, but I think that's acceptable isn't it? There are always going to be ways to make things that won't be guessable. (Also, why does this have two pipes after party_election?).

Change 459886 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[mediawiki/extensions/TemplateData@master] Prevent leading hash from starting param names when guessing

Change 459886 merged by jenkins-bot:
[mediawiki/extensions/TemplateData@master] Prevent leading hash from starting param names when guessing

This will be testable on testwikis when train resumes next week.

Niharika moved this task from QA to Q2 2018-19 on the Community-Tech-Sprint board.

Seems like the problems with Infobox officeholder (what is that??) are resolved. We can tackle others when we find them.