Page MenuHomePhabricator

Rollback does not work on items
Closed, ResolvedPublic

Description

Rollback currently isn't working on any items, giving an editconflict error when none has occurred. Reverting with the (undo) button still works.


Version: wmf-deployment
Severity: major
Whiteboard: u=dev c=backend p=0

Details

Reference
bz65831

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:10 AM
bzimport added a project: Wikidata.org.
bzimport set Reference to bz65831.
bzimport added a subscriber: Unknown Object (MLST).

Change 135696 had a related patch set uploaded by Aude:
Fix rollback by re-adding baseRevIdForSaving in EntityContent

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

Please keep this ticket open after katie's fix is merged. I'd like to have it in one of the next sprints, to investigate why this nasty workaround is needed for rollbacks. In theory, the prepareSave method gets all the info it needs from its parameters: the base rev ID, and the current rev ID. It should be sufficient to compare these. I wonder why this doesn't work for rollbacks, we should alot some time to investigating this.

It seems like WikiPage::commitRollback() calls WikiPage::doEditContent() with $baseRevId set to the ID of the revision to be rolled back to, instead of the current revision before the rollback. It's unclear what the idea behind this is, and WikiPage::doEditContent() does not specify what exactly $baseRevId is defined to mean, or what it is used for. In fact, it's not used at all per default, just passed on to some hooks and Content::prepareSave, which itself doesn't use it per default either. The revision ID recorded as the revision's "parent ID" is *not* the one passed via $baseRevId, but the ID returned by WikiPage::getLatest().

This is woefully underspecified. I'll write to the list and ask for clarification.

Change 135696 merged by jenkins-bot:
Fix rollback by re-adding baseRevIdForSaving in EntityContent

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

Change 135760 had a related patch set uploaded by Thiemo Mättig (WMDE):
Fix rollback by re-adding baseRevIdForSaving in EntityContent

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

Change 135760 merged by jenkins-bot:
Fix rollback by re-adding baseRevIdForSaving in EntityContent

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

Patch merged.

Resetting back to open per Daniel's comment about putting this in one of the next sprints.

Tobi: Is this all done now? I think we should open a separate ticket for the investigation as proposed by Daniel.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).Dec 1 2014, 2:23 PM