Page MenuHomePhabricator

Javascript Redirect to Mobile Site Broken (MobileRedirect.js?4.2 line 13)
Closed, ResolvedPublic

Description

Author: tomhopper

Description:
Wikipedia pages no longer redirect to the mobile site on iPhone. Using the Wikipedia "Enable mobile version" article link does not fix the problem (https://secure.wikimedia.org/wikipedia/en/wiki/Wikipedia:Enable_mobile_version).

iPhone Safari error console reports the following error:
JavaScript Error on Line 13
http://bits.wikimedia.org/w/extension...ikimediaMobile/MobileRedirect.js?4.2
ReferenceError: Can't find variable: wgNamespaceNumber

Note that the "?4.2" at the end of the error line may be truncated by the iPhone display width.

The Wikipedia mobile pages are accessible manually by inserting "m." in the URI (e.g. "en.m.wikipedia.org").


Version: 1.0.0 (Android)
Severity: major

Details

Reference
bz27955

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:26 PM
bzimport set Reference to bz27955.

Should be fixed with the live hack from r83579

tomhopper wrote:

Now I get the following error:

JavaScript Error on Line 18
http://bits.wikimedia.org/w/extension...ikimediaMobile/MobileRedirect.js?5.2
SyntaxError: Parse error

tomhopper wrote:

(In reply to comment #2)

Now I get the following error:

JavaScript Error on Line 18
http://bits.wikimedia.org/w/extension...ikimediaMobile/MobileRedirect.js?5.2
SyntaxError: Parse error

Looking at the code for MobileRedirect.js, there's clearly a closing parenthesis missing from the "if" statement.

(In reply to comment #3)

(In reply to comment #2)

Now I get the following error:

JavaScript Error on Line 18
http://bits.wikimedia.org/w/extension...ikimediaMobile/MobileRedirect.js?5.2
SyntaxError: Parse error

Looking at the code for MobileRedirect.js, there's clearly a closing
parenthesis missing from the "if" statement.

Was fixed in r83584.