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

Cparle created this task.Oct 2 2018, 4:27 PM
Restricted Application added a project: Multimedia. · View Herald TranscriptOct 2 2018, 4:27 PM
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

Cparle moved this task from Doing to Verify on Production on the Structured Data Engineering board.
Ramsey-WMF triaged this task as High priority.Oct 17 2018, 5:07 PM
Ramsey-WMF moved this task from Untriaged to Next up on the Multimedia board.

Tested and confirmed as fixed.

Ramsey-WMF closed this task as Resolved.Nov 8 2018, 5:38 PM