Last modified: 2013-07-17 14:29:06 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 T52983, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50983 - wbeditentity removing aliases when used from javascript console
wbeditentity removing aliases when used from javascript console
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: Immediate critical with 1 vote (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-08 22:16 UTC by Addshore
Modified: 2013-07-17 14:29 UTC (History)
8 users (show)

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


Attachments

Description Addshore 2013-07-08 22:16:40 UTC
See http://www.wikidata.org/wiki/MediaWiki_talk:Gadget-Merge.js#aliases_get_removed

When making a request which should in effect be a null edit aliases actually get removed
Comment 1 Addshore 2013-07-09 11:15:59 UTC
After looking a bit further into this it seems 2 out of 4 aliases were removed

Admète (Homonymie) ,  Admete (homonymie) => Admete (homonymie)
Adméta ,  Admete =>  Admete 

Something to do with the utf8 chars?
Comment 2 Addshore 2013-07-09 11:26:09 UTC
To reproduce:
* Load [[Q358687]] and open the js console
* Post the code below (this essentially gets the json for the entity and then sends it back to the api)

var data = JSON.parse(wbEntity);
data.id = undefined;
data.type = undefined;
data.claims = undefined;
new mw.Api().post({
  action: 'wbeditentity',
  id: wbEntityId,
  data: JSON.stringify(data),
  token: mw.user.tokens.get('editToken'),
  summary: ''
}).always(function (m, d) { console.log(m, d); })

This should be a null edit but instead removes the 2 aliases listed above.
Comment 3 [no longer active user] 2013-07-11 11:58:53 UTC
http://www.wikidata.org/w/index.php?title=Q192439&diff=prev&oldid=55263560 this is more interesting. With this bug every API call to wbeditentity is going to a data loss on Wikidata but...
Comment 4 Addshore 2013-07-11 14:41:33 UTC
https://gerrit.wikimedia.org/r/#/c/73172/
Comment 5 Gerrit Notification Bot 2013-07-11 18:30:01 UTC
Change 73204 had a related patch set uploaded by Aude:
(bug 50983) Fix set aliases in EditEntity api module

https://gerrit.wikimedia.org/r/73204
Comment 6 Gerrit Notification Bot 2013-07-11 19:48:00 UTC
Change 73204 merged by Addshore:
(bug 50983) Fix set aliases in EditEntity api module

https://gerrit.wikimedia.org/r/73204
Comment 7 Aude 2013-07-11 20:21:31 UTC
this is deployed now.
Comment 8 Gerrit Notification Bot 2013-07-11 20:23:57 UTC
Change 73322 had a related patch set uploaded by Aude:
(bug 50983) Fix set aliases in EditEntity api module

https://gerrit.wikimedia.org/r/73322
Comment 9 Gerrit Notification Bot 2013-07-11 20:26:08 UTC
Change 73322 merged by Addshore:
(bug 50983) Fix set aliases in EditEntity api module

https://gerrit.wikimedia.org/r/73322
Comment 10 abraham.taherivand 2013-07-17 14:29:06 UTC
Verified in Wikidata demo time July 27th

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


Navigation
Links