VisualEditor: Transclusion dialog parameter filter should search on both parameter name and parameter label
Closed, ResolvedPublic

Description

Two screenshots showing the search function applied to {{cite book}} on en.wp

A user on the English Wikipedia reports that when entering a template using the transclusion editor, the search for parameters fails when the parameter includes a space:

"when I start typing "Source date" (without quotes, of course) into the search box, something interesting happens when I get to the "d" - the search results say "Unknown parameter". That is, at the point where I've typed "Source d", then - essentially - the search fails; the search software decides that there are no matching entries."

I've tested this with both {{cite web}} and {{cite book}}


Version: unspecified
Severity: enhancement
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=51822

Attached:

bzimport set Reference to bz51670.
Thryduulf created this task.Via LegacyJul 19 2013, 9:51 AM
Thryduulf added a comment.Via ConduitJul 21 2013, 4:17 PM

A user on Wikipedia has determined that the cause is that the data the search function searches on is the internal parameter name, which is invisible to the user, not the visible label. This is very wrong.

"So VE users have learned that the only way, in the Transclusion/Template dialog, to add a parameter is to type the parameter name, then press Enter. But that just changed - now you click the parameter name to select it. That's more obvious - but if, for some reason, having learned the old way, you continue to use it - that's trouble.

Example: Cite web. Let's suppose I want to add the parameter "Month of publication". I type that, hit Enter, and there it is, on the left. Except, not really. VE thinks this is a parameter not on its list - you can tell that because there is no description just above the input box where you enter the value of that parameter. (Compare to entering a value for the parameter "Source title").

Under the hood, here's what happens: VE knows that "Source title" is the label (via TemplateData) for the parameter "title". (Similarly, "URL" is the label for the parameter "url" - and yes, parameters are case sensitive.) But VE doesn't know that "Month of publication" (typed) is the label for the parameter "month". So the template code that VE actually stores is this:

{{Cite web|url = http://example.com|title = Whatever the title is|Month of publication = June}}

That doesn't cause a visible problem on the VE edit page. However, in this case, after saving the page, what is displayed to readers is "Unknown parameter |Month of publication= ignored (help) "

Recommendation: If a person types the name of a parameter and presses Enter, VE should check the typed name against the list of labels in TemplateData, for that template, and if there is a match, handle the new parameter just as if the person had clicked the matching parameter rather than typed it."

gerritbot added a comment.Via ConduitAug 30 2013, 10:20 PM

Change 82055 had a related patch set uploaded by Trevor Parscal:
Include param label in search index

https://gerrit.wikimedia.org/r/82055

gerritbot added a comment.Via ConduitAug 31 2013, 12:48 AM

Change 82055 merged by jenkins-bot:
Include param label in search index

https://gerrit.wikimedia.org/r/82055

Jdforrester-WMF added a comment.Via ConduitAug 31 2013, 2:23 PM

This is now fixed in master, and will be released to MediaWiki.org on Thursday 5 September, and to Wikipedias on Thursday 12 September. Sorry for the disruption.

Thryduulf added a comment.Via ConduitSep 2 2013, 10:55 AM

Will this allow searching on instring matches of both title and label?

If not, will that be covered by bug 51822 or is a new bug required?

Add Comment