Page MenuHomePhabricator

Mobile view url broken on beta cluster (redirect, mobile view, etc.)
Closed, ResolvedPublic

Description

Visit https://en.m.wikipedia.beta.wmflabs.org and you'll be taken to https://en.m.wikipedia.beta/wiki/Main_Page rather than https://en.m.wikipedia.beta.wmflabs.org/wiki/Main_Page

A similar problem exists when switching from the desktop site to the mobile site using the link in the footer.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
bd808 renamed this task from Redirecting to a page on beta labs doesn't work to Redirecting to a page on beta cluster doesn't work.Nov 29 2016, 9:55 PM

I imagine this would be something in the mobile_redirect function in modules/varnish/templates/text-frontend.inc.vcl.erb

Oh, no, maybe not, I misunderstood the hackery going on here:

krenair@deployment-mediawiki04:~$ curl -vvv -H 'X-Subdomain: M' -H 'Host: en.wikipedia.beta.wmflabs.org' 'http://deployment-mediawiki04/' -I 2>/dev/null | grep Location:
Location: https://en.m.wikipedia.beta/wiki/Main_Page
=$wgMobileUrlTemplate
"%h0.m.%h1.%h2"

Change 324340 had a related patch set uploaded (by Alex Monk):
Follow-up I3b706396 and Id8c53f8f: Fix -labs variations of wmgM(F|Mobile) variables

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

Krinkle renamed this task from Redirecting to a page on beta cluster doesn't work to Mobile view url broken on beta cluster (redirect, mobile view, etc.).Nov 29 2016, 10:51 PM

Change 324340 merged by jenkins-bot:
Follow-up I3b706396 and Id8c53f8f: Fix -labs variations of wmgM(F|Mobile) variables

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

Looks like this is now fixed. Thanks!

Thanks @Krenair!


Oh, no, maybe not, I misunderstood the hackery going on here:

krenair@deployment-mediawiki04:~$ curl -vvv -H 'X-Subdomain: M' -H 'Host: en.wikipedia.beta.wmflabs.org' 'http://deployment-mediawiki04/' -I 2>/dev/null | grep Location:
Location: https://en.m.wikipedia.beta/wiki/Main_Page

That's a doozy, ain't it? 😉