Page MenuHomePhabricator

Don't show Visual diff switcher for diff of suppressed revisions
Open, LowPublicBUG REPORT

Description

What is the problem?

When viewing a diff where one of the revisions is suppressed, if you try to switch to the "Visual" diff you see the error:

Invalid response from server

or

The specified title ($1) does not exist

If Visual diff does not support suppressed revisions, we should probably not show the switcher.

Steps to reproduce problem
  1. Go to https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Conflict-title-0.25968288104487747-I%C3%B1t%C3%ABrn%C3%A2ti%C3%B4n%C3%A0liz%C3%A6ti%C3%B8n&diff=483921&oldid=483920
  2. Click "Visual"

Observed behavior: You see an error.

Environment

Wiki(s): https://en.wikipedia.beta.wmflabs.org MediaWiki 1.41.0-alpha (5720e51) 07:27, 31 May 2023. VisualEditor 0.1.2 (4b661a1) 06:21, 31 May 2023.

Screenshots

suppressed_revision_diff.png (701×1 px, 88 KB)

Event Timeline

Esanders subscribed.

It looks like DifferenceEngine.php does not output anything semantic when it is unable to show a revision, so the VE integration doesn't really have anything to look for, other than a lack of diff lines.

Setting to low priority as this is a rare edge case, and the suggested improvement is just a better error message.

If anyone wants to submit a patch, the relevant files are ve.init.mw.DiffPage.init.js in VE and DifferenceEngine.php in core.

This is still a problem, although a few things have changed since the initial report:

  • The switcher is not displayed, but if the previous diff you viewed was in visual mode, then the visual diff mode is still active and causes the error to be shown
  • The error message now is rest-permission-denied-revision / missing-revision-permission, and it's shown with broken formatting. (It's also the wrong error, it shows even when the viewing user does not have the permission to view the diff.)

image.png (2×3 px, 463 KB)

User doesn't have access to the requested revision (The revision #483920 belongs to a deleted page. You can [https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Special:Undelete&target=Conflict-title-0.25968288104487747-Iñtërnâtiônàlizætiøn×tamp=20210323161909&diff=prev view it]; details can be found in the [https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Special:Log/delete&page=Conflict-title-0.25968288104487747-Iñtërnâtiônàlizætiøn deletion log].).

Reported at https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#RevDel_Error_Message.