When: I hit a desktop link while browsing with a mobile user agent
Expected: User sees Special:MobileDiff
Actual: User sees desktop diff page.
Certain URLs to diffs do not redirect on mobile devices.
- When I visit example url I expect a redirect to occur taking me to the mobile url.
- If diff is a number e.g. My Page last change then I should be redirected to the mobile url.
- When I visit https://cs.wikipedia.org/w/index.php?title=MyPage&action=info I should be directed the mobile site (note how https://cs.wikipedia.org/wiki/MyPage?action=info does)
The regex used by puppet seems to be incorrect:
- The redirect is handled in MobileContext::redirectMobileEnabledPages
- The redirect only happens if diff is a provided in the query string parameter
- The redirect url is determined by SpecialMobileDiff::getMobileUrlFromDesktop();
- The redirect only applies if both diff and oldid are provided.
- If only oldid is provided without diff then the revision is shown.
- This should be fixable by simply updating SpecialMobileDiff::getMobileUrlFromDesktop(); with new test cases and making them green (https://gerrit.wikimedia.org/r/359060 Tests for diffs )
- A little bit of debugging will be needed to see why the redirect doesn't happen when title query parameter is set but it seems to relate to getStopMobileRedirectCookie
View https://de.wikipedia.org/w/index.php?title=Skull&diff=164584307 on a mobile device (or emulated Chrome Nexus 5)
Expected: user should be redirected to mobile site.