Page MenuHomePhabricator

MobileDiff appears strangely empty if previous revision is hidden
Closed, ResolvedPublic5 Estimated Story Points

Description

Background

original report and steps to reproduce

Revision 666058325 on en.wikipedia.org was hidden.

As such, the diff for it cannot be viewed. Both Vector and Minerva show a relevant message to reflect this fact:
https://en.m.wikipedia.org/wiki/Special:MobileDiff/666058325
https://en.wikipedia.org/wiki/Special:Diff/666058325

However the edit before and after it can also not be viewed. On desktop, it shows the same message
https://en.wikipedia.org/wiki/Special:Diff/666058337

But MobileDiff shows an empty page:
https://en.m.wikipedia.org/wiki/Special:MobileDiff/666058337

Developer notes

The behaviour between https://en.m.wikipedia.org/wiki/Special:MobileDiff/666058337 and https://en.wikipedia.org/w/index.php?title=Wikipedia&diff=prev&oldid=666057460 is different. With a little investigation it should be clear why (they share the same code)

Specifically the text "You cannot view this diff because one or both of the revisions have been removed from the public archives. Details can be found in the deletion log for this page. " should be shown

Acceptance criteria

  • MobileDiff should appear as usual

Testing criteria

Visit http://reading-web-staging.wmflabs.org/wiki/Special:MobileDiff/44 as anon - you should be informed it is not possible to view the revision.

Related Objects

StatusSubtypeAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenFeatureNone
OpenBUG REPORTNone
OpenNone
StalledNone
OpenFeatureNone
DuplicateNone
ResolvedNone
OpenNone
OpenNone
OpenFeatureNone
OpenNone
ResolvedNone
ResolvedNone
OpenFeatureNone
OpenNone
ResolvedHalfak
OpenNone
OpenNone
OpenFeatureNone
StalledNone
OpenNone
OpenNone
OpenNone
ResolvedPetrb
OpenNone
OpenNone
Resolvedtstarling
OpenNone
DeclinedNone
ResolvedBUG REPORTJdlrobson
ResolvedNone
Resolvedovasileva

Event Timeline

Krinkle raised the priority of this task from to Needs Triage.
Krinkle updated the task description. (Show Details)
Krinkle added a project: MobileFrontend.
Krinkle subscribed.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jhernandez lowered the priority of this task from Medium to Low.Jul 27 2016, 4:42 PM
Jhernandez moved this task from Incoming to Triaged but Future on the Web-Team-Backlog board.
Jdlrobson raised the priority of this task from Low to Medium.Aug 1 2017, 9:18 PM
Jdlrobson subscribed.

Reproducable bug.

ovasileva set the point value for this task to 3.Dec 12 2017, 5:56 PM
ovasileva changed the point value for this task from 3 to 5.
ovasileva removed the point value for this task.

Per Baha's comment, is this task to add a message like on desktop? "You cannot view this diff because one or both of the revisions have been removed from the public archives. Details can be found in the deletion log for this page."

The behaviour between https://en.m.wikipedia.org/wiki/Special:MobileDiff/666058337 and https://en.wikipedia.org/w/index.php?title=Wikipedia&diff=prev&oldid=666057460 is different. With a little investigation it should be clear why (they share the same code)

Specifically the text "You cannot view this diff because one or both of the revisions have been removed from the public archives. Details can be found in the deletion log for this page. " should be shown

Jdlrobson set the point value for this task to 5.

Change 405346 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[mediawiki/extensions/MobileFrontend@master] Fix: check old revision for deletion when diffing

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

Some repro steps:

  1. Create a new page. On my instance, this is rev 7. (Rev 8 is a File page for an image upload.)
  2. Edit the page. On my instance, this is rev 9.
  3. Delete the page (requires permission). On my instance, this is rev 10.
  4. Undelete the page (requires permission). On my instance, this is rev 11.
  5. Visit the two revisions in each state:
  6. Check more "normal" diffs like the creation diff have no regressions: http://localhost:8080/wiki/Special:MobileDiff/7.

Change 405346 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Fix: check old revision for deletion when diffing

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

ABorbaWMF added subscribers: Nirzar, ABorbaWMF.

This is working for me on the target URL in the description. Here some shots. I did notice the message has some weird text wrapping on phone width devices (@Nirzar).

image.png (1×1 px, 132 KB)

image.png (667×376 px, 86 KB)

image.png (1×720 px, 187 KB)

image.png (984×540 px, 128 KB)

image.png (1×720 px, 180 KB)

image.png (984×540 px, 134 KB)

Olga are you able to sign this off?

looks good to me! I think we might have to file a separate bug for the wrapping issue. @Jdlrobson - any idea if there's anything we can do about this?

Yes,the word wrapping needs to be present for diffs which may have lines, but it shouldn't break the word for warning messages. I'm guessing a css fix for this should be trivial.