Nikki added a comment.

I had a look at the network requests when this happens and I get

{"error":{"code":"editconflict","info":"Edit conflict.","messages":[{"name":"edit-conflict","parameters":[],"html":{"*":"Edit conflict."}}],"*":"See https://www.wikidata.org/w/api.php for API usage."},"servedby":"mw1207"}

For the first reference pasted after refreshing the page, there are no warnings. For the references pasted after that the response includes

"warnings":{"wbsetclaim":{"messages":[{"name":"wikibase-conflict-patched","parameters":[],"html":{"*":"Your edit was patched into the latest version."}}]}},

It seems that it tries to make the edit using the revision ID of the page when it was first loaded and that presumably fails for new statements because the statement being edited doesn't exist in that revision. I guess the solution is to use the current revision ID, which does seem to be returned when making edits, but I don't know if it's stored anywhere. I found mw.config.get('wgRevisionId'); and mw.config.get('wgCurRevisionId'); but they both always return the revision ID from when page was originally loaded and even when making normal edits, if you add more than one statement, the response includes the same warning about patching.


TASK DETAIL
https://phabricator.wikimedia.org/T115554

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: Nikki
Cc: Jonas, Sjoerddebruin, Aklapper, Nikki, dachary, D3r1ck01, Izno, Wikidata-bugs, aude, Ricordisamoa, Mbch331
_______________________________________________
Wikidata-bugs mailing list
Wikidata-bugs@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to