Page MenuHomePhabricator

Historical visual diff broken for revision deletions
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Visit a diff which has been deleted, eg. https://de.wikipedia.beta.wmflabs.org/w/index.php?title=Benutzer:Schnark&diff=2074&oldid=1945&visualdiff=1
  2. Switch to visual diff.
  3. If you have the right to view the deleted diff, do so.
  4. Switch to visual diff again.

Actual result:
The visual diff fails to load in both cases, and just shows the loading bar.

Expected result:
When you are not allowed to view the diff, the switch widget should either don't exist at all, be disabled, or don't do anything except telling you that you can't view the diff.
I don't know whether it is possible to show visual diffs for deleted revisions you have the right to view. If it is possible, then the diff should be shown, if RESTbase isn't able to do so, the switcher should be disabled for such diffs.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Deskana moved this task from To Triage to TR6: Visual diffs on the VisualEditor board.
Deskana set the point value for this task to 1.Aug 22 2017, 2:24 PM
Deskana renamed this task from Visual diff broken for revision deletions to Historical visual diff broken for revision deletions.Jan 16 2018, 4:55 PM

Three years later, the issue is still persisting.

Change 666236 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Handle errors when fetching revisions for visual diffs

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

Change 666236 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Handle errors when fetching revisions for visual diffs

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

matmarex subscribed.

That is a very minimal fix – it will just hide the loading bar and display an error message when appropriate.

Parsoid (and RESTBase) do not currently allow fetching deleted revisions, even for users who are allowed to view them in MediaWiki. I'm hoping that will be improved some day, at which point our visual diffs should magically start working as well. For now, showing that it's impossible is the best we can do.