Page MenuHomePhabricator

Undo links disappeared from Wikidata diffs
Closed, ResolvedPublic

Description

Wikidata diffs now do not display (undo) links. See e.g. a random diff which displays a (restore) link but not (undo). (History pages still have “undo” links.)

My personal suspect: rMW6906a7728cf5447d30da6c7a51add936f469978a#change-op58PNimx6Sc started to check for ContentHandler::supportsDirectEditing() but I don’t think Wikibase entity handler returns true there (and I am not sure it should).

Event Timeline

My personal suspect: rMW6906a7728cf5447d30da6c7a51add936f469978a#change-op58PNimx6Sc

Can confirm, reverting that commit (Ia94521b786) makes the undo appear again on localhost.

My rationale for suppressing the undo link when direct editing is disabled was that action=edit is for direct editing.
But Wikibase overrides the action handle specifically for undos, right? I recall working on that code...

That's what I get for lumping this in with the patch that introduces UnknownContentHandler.
I'll make a patch that puts back the links on the diffs.

My rationale for suppressing the undo link when direct editing is disabled was that action=edit is for direct editing.
But Wikibase overrides the action handle specifically for undos, right? I recall working on that code...

Yup, EditEntityAction supports undo(+undoafter) and restore.

Change 534812 had a related patch set uploaded (by Daniel Kinzler; owner: Daniel Kinzler):
[mediawiki/core@master] DifferenceEngine: show undo links for non-text content

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

Change 534812 merged by jenkins-bot:
[mediawiki/core@master] DifferenceEngine: show undo links for non-text content

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

This probably isn’t serious enough for a backport / Friday deployment, right? I haven’t even seen anyone complain on Project chat yet (which slightly surprises me, to be honest).

Lucas_Werkmeister_WMDE assigned this task to daniel.

Fixed in production as well, and right now the train looks pretty good, so I think there’s a good chance this won’t be rolled back either. Let’s close this :)