Last modified: 2013-09-02 10:55:03 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T53670, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 51670 - VisualEditor: Transclusion dialog parameter filter should search on both parameter name and parameter label
VisualEditor: Transclusion dialog parameter filter should search on both para...
Status: RESOLVED FIXED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: High enhancement
: VE-deploy-2013-09-05
Assigned To: Trevor Parscal
:
Depends on:
Blocks: ve-templatesupport
  Show dependency treegraph
 
Reported: 2013-07-19 09:51 UTC by Chris McKenna
Modified: 2013-09-02 10:55 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Two screenshots showing the search function applied to {{cite book}} on en.wp (19.04 KB, image/png)
2013-07-19 09:51 UTC, Chris McKenna
Details

Description Chris McKenna 2013-07-19 09:51:53 UTC
Created attachment 12891 [details]
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}}
Comment 1 Chris McKenna 2013-07-21 16:17:07 UTC
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."
Comment 2 Gerrit Notification Bot 2013-08-30 22:20:33 UTC
Change 82055 had a related patch set uploaded by Trevor Parscal:
Include param label in search index

https://gerrit.wikimedia.org/r/82055
Comment 3 Gerrit Notification Bot 2013-08-31 00:48:37 UTC
Change 82055 merged by jenkins-bot:
Include param label in search index

https://gerrit.wikimedia.org/r/82055
Comment 4 James Forrester 2013-08-31 14:23:47 UTC
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.
Comment 5 Chris McKenna 2013-09-02 10:55:03 UTC
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?

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links