Page MenuHomePhabricator

MobileFrontend: Fix "Uncaught ReferenceError: redirectToFragment is not defined"
Closed, ResolvedPublic

Description

Go to
https://en.m.wikipedia.org/wiki/Blood_purity_(Harry_Potter)#Squibs

Seems to have an inline script:
redirectToFragment("#Blood_purity");

this global does not exist. Not sure how it surfaces or what it refers to.


Version: unspecified
Severity: normal

Details

Reference
bz54245

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:55 AM
bzimport set Reference to bz54245.
bzimport added a subscriber: Unknown Object (MLST).

redirectToFragment is part of legacy wikibits.js. The call is added as inline script on redirects to section. The bug about not making it legacy is bug 35858.

Looks like the proposed fix [1] will magically fix this one.
A module to handle this is added to the OutputPage but it will be filtered out by mobile targets.

[1] https://gerrit.wikimedia.org/r/#/c/94412/6

Is this fixed now, with that patch merged?