Note that this is not the same as bug 50715. Though they behave the same from the user point of view, bug 50715 is for a case where aliases are not in play.
e.g. given our Unsigned template with parameter "user", "timestamp" and aliases "1" and "2" respectively.
Having added "mw.log('addParameterSearch-select', name, names);" to ve.ui.MWTransclusionDialog#getTemplatePage in the select event handler of the addParameterSearch object; editing the following invocations:
case {{Unsigned|Foo|April 1}}
case {{Unsigned|1=Foo|2=April 1}}
typing "1" > addParameterSearch-select null ["1", "2"] > addParameterSearch-select "user" ["1", "2"] > "Add" is enabled typing "user" > addParameterSearch-select null ["1", "2"] > addParameterSearch-select "user" ["1", "2"] > "Add" is enabled
case {{Unsigned|user=Foo|timestamp=April 1}}
typing "1" > addParameterSearch-select null ["date", "user"] > addParameterSearch-select 1 ["date", "user"] > "Add" is enabled typing "user" > addParameterSearch-select null ["date", "user"] > addParameterSearch-select null ["date", "user"] > "Add" is disabled
The latter case actually works as expected, although it is odd that the value given to the select callback is null and not "user" and that the button is already disabled (probably by the select widget?).
Also weird that the callback is constantly triggered twice, once for null and once for the actual value.
Anyway, the solution is to resolve the names to their alias origins before doing the names.indexOf( name ) check.
Version: unspecified
Severity: normal