Page MenuHomePhabricator

Link to history is missing in mobile view for anonymous page views with pending changes
Closed, ResolvedPublic3 Estimated Story Points

Description

Steps to reproduce:

  1. Visit any page with pending changes, e.g. any from https://de.m.wikipedia.org/wiki/Italiaonline on the mobile website as a logged-out user

Expected:
There should be some way to view the history.

Actual:
There is no such link, the timestamp of the last edit (which normally links the history) is missing.

Screen Shot 2017-11-15 at 9.48.56 AM.png (369×1 px, 59 KB)

Developer notes

The Minerva skin only prints a history page if

$isLatestRevision = $this->getRevisionId() === $title->getLatestRevID();
$this->getWikiPage()->exists() && $isLatestRevision

If FlaggedRevs is being used I guess the revision is not the latest revision. This seems to be a regression introduced by T153125.
We should update that logic so it works in a similar way when oldid is present. We should mimic the logic that shows the notice "This is an old revision of this page".

Investigating this more, the desktop URL does not show last modified information in the footer of the page for https://de.wikipedia.org/wiki/Italiaonline so this is unlikely to have ever worked and should not be considered a regression:

Screen Shot 2017-11-16 at 2.47.29 PM.png (502×1 px, 138 KB)

The best compromise would be to treat these pages the same way as we treat the main page and show a history link.

Testing steps

  • Visit http://reading-web-staging.wmflabs.org/w/index.php?title=Pending_changes_test_page as an anonymous user
    • Setup FlaggedRevs and add yourself with reviewer permission.
    • Create a page and approve the changes yourself
    • As an anonymous user edit the page and save. This should create a pending change.
    • Refresh the page as the anon user and you'll be in the test scenario.
  • Expected: should be a link to the history page
  • Actual: No link/no last modified information.

Event Timeline

Jdlrobson subscribed.

I'm not sure I understand the problem here.
Which page does not have a history link? It's a bit unclear in your reproduction steps where you are expecting to see it. Can you provide a specific URL? I'm not 100% clear what Spezial:Seiten_mit_ungesichteten_Versionen has to do with this bug report right now.

Jdlrobson triaged this task as Medium priority.Nov 13 2017, 5:06 PM

I'm not 100% clear what Spezial:Seiten_mit_ungesichteten_Versionen has to do with this bug report right now.

This issue applies to all pages listed there, and only to those.
For example, currently https://de.wikipedia.org/wiki/Italiaonline is on that list, and when you visit https://de.m.wikipedia.org/wiki/Italiaonline while not logged in, you won't see a link to the history. But once that page is reviewed, the link to the history will be shown again, so to reproduce it is best to first visit https://de.wikipedia.org/w/index.php?title=Spezial:Seiten_mit_ungesichteten_Versionen&namespace=0, select any page listed there, and view this page in mobile view while not logged in.

Jdlrobson renamed this task from Link to history is missing in mobile view for pages with pending changes when not logged in to Regression: Link to history is missing in mobile view for anonymous page views with pending changes.Nov 14 2017, 5:56 PM
Jdlrobson raised the priority of this task from Medium to High.
Jdlrobson updated the task description. (Show Details)
Jdlrobson moved this task from Incoming to Upcoming on the Web-Team-Backlog board.

The link to the history is actually missing always if you are viewing any non-current version (e.g. https://de.m.wikipedia.org/w/index.php?title=Spielw%C3%BCrfel&oldid=171015053), and viewing a page with pending changes as anon just gives you an old version of the page (without the notice on the top that it is an old version).

The link to the history is actually missing always if you are viewing any non-current version

Yep this is by design since the history link is at the top of the page and we were worried about confusion over showing that message for something which wasn't updated. It shouldn't apply however to whatever is the current viewable revision (i.e. where the notice at top is absent)

MBinder_WMF set the point value for this task to 3.Nov 15 2017, 6:39 PM
ovasileva removed the point value for this task.
ovasileva set the point value for this task to 3.Nov 15 2017, 6:43 PM
ovasileva moved this task from Upcoming to 2017-18 Q2 on the Web-Team-Backlog board.
Jdlrobson renamed this task from Regression: Link to history is missing in mobile view for anonymous page views with pending changes to Link to history is missing in mobile view for anonymous page views with pending changes.Nov 16 2017, 11:10 PM
Jdlrobson removed a project: Regression.
Jdlrobson updated the task description. (Show Details)

Change 391974 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Show last modified bar without relative time for old revisions

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

After looking into this, I see that desktop does not show a timestamp either, so I propose we show a link to "view edit history of page" as we do on Main page for these kind of pages like so:

Screen Shot 2017-11-16 at 3.11.31 PM.png (607×1 px, 68 KB)

While working on this I also discovered a bug with how we display revisions.

Screen Shot 2017-11-16 at 2.18.28 PM.png (290×1 px, 69 KB)

The box should be styled and is simple to fix. Not sure if we want to track that separately.

Change 391974 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Show last modified bar without relative time for old revisions

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

All patches seem to have been merged. Anything else left to do?

Mostly done but there is a juicy refactor to take care of still: https://gerrit.wikimedia.org/r/392890

^ @bmansurov has reviewed @Jdlrobson's change and made some suggestions.

Jdlrobson added a subscriber: ABorbaWMF.

Over to you @ABorbaWMF. Testing criteria is up to date (you can ignore the second indent of bullet points for the purpose of testing this task)

It's looking good to me. I just used the example article and edited a 'security' article on staging. Tried it on a few platforms and browsers.

looks good. thanks all!