Last modified: 2013-01-14 16:55:40 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 T45285, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 43285 - Undoing alias change results in losing alias
Undoing alias change results in losing alias
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Jeroen De Dauw
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-20 10:47 UTC by tobias.gritschacher
Modified: 2013-01-14 16:55 UTC (History)
5 users (show)

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


Attachments

Description tobias.gritschacher 2012-12-20 10:47:42 UTC
Reproducing the bug:

* Create a new item with label "test" and description "test"
* Add 3 aliases, "A", "B", "C"
* Add a "en" sitelink "Berlin"
* Change the label to "test_changed"
* Change the description to "test_changed"
* Edit the aliases, clear the field with alias "A" and add a new alias "A2" in the same step.
* Edit the "en" sitelink and change it to "Berlin Wall"
* Click on "View history" to see the revisions
* Undo the aliases change "(Added and removed [en] aliases: A2, A)"
* Bug: now the alias "A2" gets removed but the alias "A" does not get restored.

This bug occurs since Ic46422c3 and Ibfbc0902 got merged in.
Comment 1 Jeroen De Dauw 2012-12-20 15:37:32 UTC
Issue found:

  'aliases' => 
    array (size=1)
      'en' => 
        array (size=1)
          1 => string 'A2' (length=2)

As you can see, this entity has an array with aliases with a single element with key 1. Since it's 1, and not 0, it does not match what can be safely interpreted as a non-associate array, and this gets treated as an associative one by the differ using a MapDiff rather then a ListDiff.
Comment 2 Jeroen De Dauw 2012-12-20 16:01:36 UTC
https://gerrit.wikimedia.org/r/#/c/39588/
Comment 3 abraham.taherivand 2013-01-14 16:55:40 UTC
Verified in Wikidata demo sprint 28

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


Navigation
Links