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

Mormegil created this task.Fri, Sep 6, 12:30 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptFri, Sep 6, 12:30 PM

My personal suspect: rMW6906a7728cf5447d30da6c7a51add936f469978a#change-op58PNimx6Sc

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

daniel added a comment.Fri, Sep 6, 1:54 PM

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).

Undo links are back on Beta Wikidata now (random diff)

Lucas_Werkmeister_WMDE closed this task as Resolved.Wed, Sep 11, 5:47 PM
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 :)