I noticed while parsing the webrequest logs for our language detection test we were sending people from sites like frr.m.wikipedia.org to ar.wikipedia.org. We should be sending them to ar.m.wikipedia.org.
Description
Related Objects
- Mentioned Here
- T273772: Mobile language link should lead to mobile page
Event Timeline
perhaps not just mobile, parsing through the logs i also see us forwarding someone from en.zero.wikipedia.org to ar.wikipedia.org
We should take care of this. Because we were only measuring clickthrough in the test, this doesn't actually skew the results, but it could skew future tests, and it's definitely a suboptimal user experience anyway if the user is explicitly using the mobile site.
I'm not sure but the mobile extension should automatically redirect to the mobile page.
For example if you browse en.m.wikipedia.org and look at interwiki links, they point to the desktop site (e.g. https://af.wikipedia.org/wiki/Kameelperd), but when you click on it you are automatically redirected to the mobile version (https://af.m.wikipedia.org/wiki/Kameelperd).
Concerning zero.wikipedia.org I have no idea...
It looks like (untested, just reviewed what currently exists) we need to use MobileContext::singleton()->getMobileUrl() to transform a desktop url into a mobile url. This looks to internally handle generating zero urls as necessary.
we might want to gate calling that on the following, which is used in the WikimediaEvents repo, but i havn't fully reviewed yet.
$isMobile = class_exists( 'MobileContext' ) && MobileContext::singleton()->shouldDisplayMobileView();
First of all, do we have any evidence that people aren't getting automatically redirected to mobile subdomains?
The existing mobile configuration gives users bounce redirects unless they have particular cookies that get set/unset when clicking the links to switch. It doesn't work like i would expect, but it does work the same as existing interwiki links, so this bug has nothing to do.
Redirect does not happen when using the mobile site on a desktop computer
Then it's:
- https://en.m.wikipedia.org/wiki/Cat (Mobile)
- Click "Language"
- Click "Afrikaans"
- https://af.wikipedia.org/wiki/Kat (Desktop)
(I prefer to use the mobile design on desktop)
@283Cwritten: Hi, please follow https://www.mediawiki.org/wiki/How_to_report_a_bug and file a new ticket for new problems - thanks! :)