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 raised the priority of this task from to High.
Anoopan updated the task description. (Show Details)
Anoopan subscribed.

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

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.

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 claimed this task.