https://bugzilla.wikimedia.org/show_bug.cgi?id=50717
Web browser: ---
Bug ID: 50717
Summary: VisualEditor: Transclusion dialog doesn't account for
aliases when preventing duplicate entries from being
added
Product: VisualEditor
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Editing Tools
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l