Page MenuHomePhabricator

generate mobile links in interwiki search results if user is on mobile site
Closed, ResolvedPublic

Description

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.

Event Timeline

EBernhardson raised the priority of this task from to Needs Triage.
EBernhardson updated the task description. (Show Details)
EBernhardson subscribed.

perhaps not just mobile, parsing through the logs i also see us forwarding someone from en.zero.wikipedia.org to ar.wikipedia.org

Deskana subscribed.

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?

EBernhardson claimed this task.

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:

(I prefer to use the mobile design on desktop)

New to how things are done here

Aklapper closed this task as Resolved.EditedJan 11 2021, 9:38 AM

@283Cwritten: Hi, please follow https://www.mediawiki.org/wiki/How_to_report_a_bug and file a new ticket for new problems - thanks! :)