Page MenuHomePhabricator

Remove undo and restore functionality from SubmitEntityAction
Open, Needs TriagePublic

Description

With T204732 and T189808 in place, MediaWiki core has support for undoing and reverting revisions with multiple content slots (Multi content revisions), and also revisions with "non-editable" content in the main slot (such as wikibase entities).
This means that Wikibase most likely no longer needs to provide this functionality via SubmitEntityAction by overriding undo https://github.com/wikimedia/Wikibase/blob/master/repo/includes/Actions/SubmitEntityAction.php#L83

It's possible that some extra logic is needed, and this will need to be evaluated when the code is looked at, for example we recently touched this in T97146: [Bug] Fatal Wikibase PatcherException from EntityContent.php when undoing edits

Notes:

  • "non-editable": This means content that is not editable by default in MediaWiki (so anything that is not just text / wikitext for example. Wikibase entities do not allow "direct" editing, only editing via our special APIs.

Acceptance criteria ⛺✨ :

  • Reduce the "custom code" in the SubmitEntityAction::undo method, making use of what MediaWiki core provides where possible

Event Timeline

This area was looked at by campsite in the past weeks.
It was expressed that perhaps the core functionality might not totally cover our needs?
So we should try and check this in some way before moving to ticket polishing? Or write it in such as way that part of the task is the investigation into the core functionality.
I would guess this would be expressed in an uncertainty value if we had one in our scoring system.