Page MenuHomePhabricator

History links with curid set do not redirect properly on mobile
Closed, ResolvedPublic5 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

Heddy10 created this task.Jan 23 2019, 11:08 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 23 2019, 11:08 PM
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 Normal 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.

Jdrewniak moved this task from Needs triage to Triaged on the Mobile board.Jan 24 2019, 9:16 AM

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 Normal to High.Jul 29 2019, 11:47 PM
Jdlrobson added a subscriber: Jdlrobson.

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 moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.
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.
Jdlrobson set the point value for this task to 5.Jul 31 2019, 5:30 PM

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

Edtadros reassigned this task from Edtadros to Jdlrobson.Aug 8 2019, 2:18 PM
Edtadros added a subscriber: Edtadros.

@Jdlrobson where do I test this?

Jdlrobson reassigned this task from Jdlrobson to Edtadros.Aug 8 2019, 3:19 PM
Jdlrobson updated the task description. (Show Details)

Sorry about that @Edtadros Updated now!

Edtadros reassigned this task from Edtadros to ovasileva.Aug 8 2019, 4:09 PM

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.

Edtadros updated the task description. (Show Details)Aug 8 2019, 4:10 PM
ovasileva closed this task as Resolved.Aug 8 2019, 5:39 PM

Looks good!