Page MenuHomePhabricator

MediaWiki:Gadget-Move.js is partly functional
Open, Needs TriagePublic

Event Timeline

Kareyac created this task.Apr 23 2019, 4:00 AM
Restricted Application added a project: Wikidata. · View Herald TranscriptApr 23 2019, 4:00 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
matej_suchanek renamed this task from MediaWiki:Gadget-Move.js is partly functional. to MediaWiki:Gadget-Move.js is partly functional.Apr 23 2019, 3:41 PM
matej_suchanek removed Kareyac as the assignee of this task.
Laddo added a subscriber: Laddo.Apr 24 2019, 11:55 AM

Do we know if this is a problem in the gadget or the merge API?

Finally, I captured the sever response (and then even one more time):

In other words, the removed sitelink cannot be added to the other item because (the system thinks) it's still in the first item, although it's already been removed. The server is probably too slow to handle consecutive sitelink removal and addition.

merge API?

Seems to be irrelevant, it isn't used by the gadget...

No change has been made yet, it's likely this will happen again and again.
Not sure what those links justify.

Kareyac added a comment.EditedApr 30 2019, 4:42 PM

Sorry, last comment not for this thread. Still not working.

Sjoerddebruin moved this task from Backlog to Bugs on the Wikidata-Gadgets board.May 2 2019, 2:43 PM
Moebeus added a subscriber: Moebeus.May 2 2019, 3:06 PM
Esc3300 triaged this task as Unbreak Now! priority.May 16 2019, 8:18 AM
Restricted Application added a subscriber: Liuxinyu970226. · View Herald TranscriptMay 16 2019, 8:18 AM

Having looked at the gadget code and Wikibase API code briefly it might be tempting to see this as an issue with the "add sitelink" API call happening too fast after the removal. How often does this happen? Could we have some more data on failing cases (i.e. responses posted above are very useful, I'd still be a bit interested in the respective requests). I couldn't quickly reproduce the situation myself, I also don't want to make random edits on Wikidata to just debug the issue.

Could you try a bit of artificial "sleep" time after the first API call in the gadget, to rule out that it is or is not the timing issue?

I don't use it that often, but I think it didn't work every time in recent weeks.

This sandbox has sitelinks that could be moved to another sandbox.

Esc3300 added a comment.EditedMay 16 2019, 2:53 PM

I tried it there just now: the first worked, the second didn't.

Maybe it has something to do with the edits done just before.

Could you try a bit of artificial "sleep" time after the first API call in the gadget, to rule out that it is or is not the timing issue?

Did it. The gadget will now wait 1000ms before adding the link:

Esc3300 added a comment.EditedMay 18 2019, 1:53 PM

Thanks to both of you. I tested the workaround on the sandbox item above and it worked.

Esc3300 lowered the priority of this task from Unbreak Now! to Needs Triage.May 18 2019, 1:54 PM
Laddo removed a subscriber: Laddo.Jul 8 2019, 1:59 PM