Page MenuHomePhabricator

Sometimes scripts imported by mw.loader.load on common.js are not executed
Closed, DeclinedPublic

Description

After MediaWiki.org was updated to MW 1.19 I noticed my global scripts were not being loaded sometimes.

I replaced the content of [[mw:Project:Sandbox]] by the code

window.console.log( 'ok' );

and added

mw.loader.load( '//www.mediawiki.org/w/index.php?title=Project:Sandbox&oldid=501326&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400' );

to [[mw:Special:MyPage/common.js]]. When I opened [[mw:Special:Random]] a few times, I was expecting to always get the "ok" message in the error console, but this only happened some times. When it didn't, a SHIFT+Reload solved the problem for that page, but then if a opened another random page the problem is back again.

I've reproduced this on Google Chrome 17.0.963.56 and Firefox 10.0.2.


Version: unspecified
Severity: normal
URL: https://www.mediawiki.org/w/index.php?oldid=501327

Details

Reference
bz34517

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 12:12 AM
bzimport set Reference to bz34517.
bzimport added a subscriber: Unknown Object (MLST).
He7d3r created this task.Feb 19 2012, 4:12 PM

Can you check whether there are warnings in the web console saying "A call to document.write() from an asynchronously-loaded external script was ignored."? If so then this bug and bug 34542 are duplicates and the document.write()-call done by mw.loader.load is to blame for this bug.

I'm not able to reproduce this anymore. Closing for now.

Agreed. Can't reproduce.