Page MenuHomePhabricator

Revision ID 0 shown for previously valid diff= links
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

  1. (Assuming you are an admin on cswiki.) Visit https://cs.wikipedia.org/w/index.php?title=Jak_se_chov%C3%A1_antilopa&diff=24332159&uselang=en. The title matches the now-deleted page to which the revision belongs.
  2. Observe "One revision of this difference (0) was not found."

obrazek.png (372×1 px, 51 KB)

Next:

  1. Visit https://cs.wikipedia.org/w/index.php?title=ABC&diff=24332159&uselang=en. This URL refers to the same revision ID, but changes the title to garbage.

Now the correct revision ID is displayed (with a link), even though a "slightly invalid" URL was used.

obrazek.png (424×1 px, 53 KB)

You can even omit the title completely: https://cs.wikipedia.org/w/index.php?diff=24332159&uselang=en. The page then assumes the "default" Main page title (T380102).

What should have happened instead?

The revision ID should always be displayed, and if you have sufficient rights, you should get a link to view the deleted content.

The UX could also be improved:

  • Some elements (e.g., Help link) are useless or have different/conditional appearance even though it's basically the same page.
  • The link should have diff=prev, so that a diff is shown directly.

Details

Event Timeline

Pppery subscribed.

At least to look at what the heck is happening here, can't promise I'll submit a patch.

Specifically, whether or not you're an admin, it seems like if title exists it does the right thing and if title doesn't exist it does the wrong thing.

Change #1249078 had a related patch set uploaded (by Pppery; author: Pppery):

[mediawiki/core@master] Sort out handling of diffs with missing revisions

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

Ugh. This was much more of a pain than I thought - I found myself fixing three other bugs in addition to this one, and reported two more (T419366, T419367)

See also: T258878 and T326766 for a different type of bogus diff.

Change #1249078 merged by jenkins-bot:

[mediawiki/core@master] Sort out handling of diffs with missing revisions

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

matmarex subscribed.