Page MenuHomePhabricator

jQuery is not defined on page on wmf wiki
Closed, ResolvedPublic

Description

On https://m.wikimediafoundation.org/wiki/L11_1128_Rinfo_short/en/US#/random

Uncaught ReferenceError: jQuery is not defined US:362
(anonymous function)	@	US:362

and on https://wikimediafoundation.org/wiki/L11_1128_Rinfo_short/en/US

ReferenceError: jQuery is not defined
 /wiki/L11_1128_Rinfo_short/en/US:360:6

Event Timeline

Danny_B triaged this task as Medium priority.Jul 3 2016, 1:36 PM
Danny_B added a project: JavaScript.
Danny_B added a subscriber: Krinkle.

This page is using raw HTML. Since August 2015 the MediaWiki front-end has its JavaScript loaded fully asynchronous (T107399).

In order to execute JavaScript if the current browser is supported and after the base modules have loaded (jquery.js, mediawiki.js), use RLQ.

(window.RLQ=window.RLQ||[]).push(function(){
 // jQuery( .. ), mw.loader ..., mw.html .., etc.
});

See the source code of any wiki page for examples. And ResourceLoader::makeLoaderConditionalScript().

https://www.mediawiki.org/wiki/Compatibility#Browsers

This is an ancient page. @Josve05a how did you arrive at that URL?>

awight lowered the priority of this task from Medium to Low.Jul 5 2016, 8:23 PM
Ejegg claimed this task.
Ejegg subscribed.

Wow, that page is even trying to insert contribution tracking records from foundationwiki! I added a notice to the top of the 2011 template pointing people to Ways to Give. All the pages we care about working should be updated by now.