Page MenuHomePhabricator

ml.wikipedia.org not redirecting to mobile site while accessing from a mobile device; many "Error: Module not found" errors
Closed, ResolvedPublic

Description

We are facing an issue in mlwiki projects. While accessing mlwiki projects from mobile, it is not automatically redirecting to mobile interface. For example when i access ml.wikipedia.org from a mobile device, site is not redirecting to ml.m.wikipedia.org.

Event Timeline

Anoopan created this task.Oct 10 2015, 7:49 PM
Anoopan raised the priority of this task from to High.
Anoopan updated the task description. (Show Details)
Anoopan added a subscriber: Anoopan.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 10 2015, 7:49 PM
Reedy added a subscriber: Reedy.Oct 10 2015, 7:49 PM

It has been noted that it only seems to be broken on ml language projects

Reedy set Security to None.
Aklapper added a project: MobileFrontend.EditedOct 12 2015, 9:03 AM

Does this problem happen when you are logged in? Or when you are logged out? Or both?

Confirming on a Nokia N950 when being logged out.
Loading https://ml.m.wikipedia.org/?debug=true I get many "Error: Module not found" errors, starting with
TypeError: mw.storage is undefined in
https://ml.wikipedia.org/static/1.27.0-wmf.2/extensions/MobileFrontend/resources/mobile.settings/settings.js for

function get( name, useCookieFallback ) {
var val = mw.storage.get( name );

Though that only seems to be the case when I'm not logged in.

Aklapper renamed this task from ml.wikipedia.org is not redirecting to mobile site while accessing from a mobile device to ml.wikipedia.org not redirecting to mobile site while accessing from a mobile device; many "Error: Module not found" errors.Oct 12 2015, 9:03 AM

Does this problem happen when you are logged in? Or when you are logged out? Or both?

Confirming on a Nokia N950 when being logged out.
Loading https://ml.m.wikipedia.org/?debug=true I get many "Error: Module not found" errors, starting with
TypeError: mw.storage is undefined in
https://ml.wikipedia.org/static/1.27.0-wmf.2/extensions/MobileFrontend/resources/mobile.settings/settings.js for

function get( name, useCookieFallback ) {
var val = mw.storage.get( name );

Though that only seems to be the case when I'm not logged in.

No. It happens even if you're logged in.

Krenair added subscribers: BBlack, Krenair.

I was browsing through the wikimedia varnish config earlier looking for something completely unrelated, and wondered into this line:
set req.http.MobileHost = regsub(req.http.MobileHost, "^((?!commons|meta|nostalgia|quote|quality|sep11|sources|species|textbook|m)\w+)\.(wikipedia|wiktionary|wikinews|wikisource|wikiquote|wikibooks|wikiversity|wikivoyage)\.", "\1.m.\2.");

I remembered this bug, and I think that disallowed m subdomain match causes the mobile redirect to fail for domains that begin with 'm':

alex@alex-laptop:~/Development/Wikimedia/Operations-Puppet (ssh-key-ldap-lookup)$ grep "^m" ../Operations-MediaWiki-Config/langlist
mai
map-bms
mdf
mg
mh
mhr
mi
min
mk
ml
mn
mo
mr
mrj
ms
mt
mus
mwl
my
myv
mzn

@BBlack: What if we make it m\b? That should prevent m.$project.org, but allow the language code subdomains.

Restricted Application added a subscriber: Matanya. · View Herald TranscriptOct 13 2015, 2:06 AM

Yeah that must be it, will make a patch.

Change 245891 had a related patch set uploaded (by BBlack):
Fix mobile direct for m.* langs - T115191

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

Change 245891 merged by BBlack:
Fix mobile direct for m.* langs - T115191

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

Krenair closed this task as Resolved.Oct 13 2015, 9:04 PM
Krenair claimed this task.
BBlack moved this task from Triage to Done on the Traffic board.Oct 26 2015, 4:29 PM