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.
Description
Event Timeline
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.
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.
Change 245891 had a related patch set uploaded (by BBlack):
Fix mobile direct for m.* langs - T115191