Page MenuHomePhabricator

History links with curid set do not redirect properly on mobile
Closed, ResolvedPublic5 Estimated Story Points

Description

Note: This problem impacts Special:RecentChanges on mobile NOT the advanced mobile contributions mode. The problem is the Special:MobileHistory redirect.

How to reproduce:

  1. Go to Special:RecentChanges on any wiki while using mobile view with AMC DISABLED.
  2. Select a history link, i.e. the "hist" link which is formatted like (diff | hist).

Actual result: navigates to the article.
Expected result: navigates to the article's history.

For example, here's a URL you get with desktop view: https://en.wikipedia.org/w/index.php?title=Plasma_display&curid=175859&action=history
Actual URL you get on mobile: https://en.m.wikipedia.org/w/index.php?title=Special:History/Plasma_display&curid=175859
Probably what the expected URL should be (these both give you the history page): https://en.m.wikipedia.org/wiki/Special:History/Plasma_display or https://en.m.wikipedia.org/w/index.php?title=Special:History/Plasma_display
Note how the actual URL is not the article's history, but just the article itself.

This happens regardless of device or web browser; using mobile view on a desktop computer gives the same result as mobile view on a mobile device. Skins have no effect; using Minerva Neue is the same as using Timeless. It happens on all MediaWiki-powered wikis that offer mobile view.

Developer Notes:

The history link has a URL like this:
https://en.m.wikipedia.org/w/index.php?title=John_Finnie&curid=31775812&action=history
Which redirects to this:
https://en.m.wikipedia.org/w/index.php?title=Special:History/John_Finnie&curid=31775812
However that is not a Special:History page. this is:
https://en.m.wikipedia.org/wiki/Special:History/John_Finnie
Whenever curid is used alongside a title without action=history it will show the page with revision <curid>

The logic in MobileContext::redirectMobileEnabledPages should unset( $values['curid'] );

QA steps

  1. Go to Special:RecentChanges on any wiki while using mobile view with AMC DISABLED. Tip: use incognito window.
  2. Select a history link, i.e. the "hist" link which is formatted like (diff | hist). Note the title of the page it corresponds to.

Expected result: navigates to the article history page. THe title should match expectations.

QA Results

ACStatusDetails
1T214531#5403017

Event Timeline

Jdrewniak renamed this task from History links on recent changes do not work correctly on mobile to History links on mobile Special:RecentChanges link to article page instead of Special:History.Jan 24 2019, 9:11 AM
Jdrewniak triaged this task as Medium priority.
Jdrewniak updated the task description. (Show Details)

Thanks for the bug report. We currently don't officially support the Recent Changes page on mobile, but we have an project Advanced Mobile Contributions to do so this year, so we'll fix this when we expose the Recent Changes page on mobile, tracked in T178194.

Change 499864 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Remove the SpecialMobile(History|Contributions) page and use the core versions

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

Change 499864 abandoned by Jdlrobson:
Remove the SpecialMobile(Watchlist|History|Contributions) page and use the core versions

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

Change 501449 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Drop History override on mobile

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

Jdlrobson raised the priority of this task from Medium to High.Jul 29 2019, 11:47 PM
Jdlrobson subscribed.

Somehow this got overlooked and if it impacts the AMC mode but I think it's an important bug to fix as it makes many of the links in the recent changes page unusable to editors. I'm not sure how/if it will impact AMC, and priority may depend on whether that's the case. High until proven otherwise.

Jdlrobson renamed this task from History links on mobile Special:RecentChanges link to article page instead of Special:History to History links with curid set do not redirect properly on mobile.Jul 31 2019, 3:39 PM
Jdlrobson removed Jdlrobson as the assignee of this task.

Change 528883 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Use curid in history page redirect code

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

Change 528883 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Use curid in history page redirect code

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

Jdlrobson updated the task description. (Show Details)

Sorry about that @Edtadros Updated now!

Test Result

Status: ✅ PASS
OS: macOS Mojave
Browser: Chrome
Device: MBP
Emulated Device: iPhoneX

Test Artifact(s):

QA steps

  1. Go to Special:RecentChanges on any wiki while using mobile view with AMC DISABLED. Tip: use incognito window.
  2. Select a history link, i.e. the "hist" link which is formatted like (diff | hist). Note the title of the page it corresponds to.

✅ AC1: navigates to the article history page. The title should match expectations.

T214531.gif (808×372 px, 342 KB)

Change 501449 abandoned by Jdlrobson:
Drop History override on mobile

Reason:
Not enough resources/focus to work on this right now.

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