Page MenuHomePhabricator

Adding >1 multi-lingual file captions via UploadWizard fails
Closed, ResolvedPublic

Description

First checkout https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/463724 - you need this for Wikibase to work properly with MCR (might be merged by the time you read this ...)

Now upload a file, and add more than 1 caption

Adding the first, adding any subsequent one fails

The reason is - if you do a wbsetlabel call with id: <a mediainfo entity id> and without baserevid, the backend tries to create a new entity with the id you sent. This is fine for the first wbsetlabel call (because the entity needs to be created), but won't work for subsequent calls, as the entity already exists

The fix is - retrieve lastrevid from the response to each wbsetlabel call, and send that value as baserevid with the next call

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 464572 had a related patch set uploaded (by Matthias Mullie; owner: Matthias Mullie):
[mediawiki/extensions/UploadWizard@master] Post baserevid when submitting captions in multiple languages

https://gerrit.wikimedia.org/r/464572

Change 464572 merged by jenkins-bot:
[mediawiki/extensions/UploadWizard@master] Post baserevid when submitting captions in multiple languages

https://gerrit.wikimedia.org/r/464572

Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.