Last modified: 2012-05-03 02:42:44 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T36517, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34517 - Sometimes scripts imported by mw.loader.load on common.js are not executed
Sometimes scripts imported by mw.loader.load on common.js are not executed
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
unspecified
All All
: Highest normal (vote)
: 1.19.0 release
Assigned To: Nobody - You can work on this!
https://www.mediawiki.org/w/index.php...
:
Depends on:
Blocks: 31217
  Show dependency treegraph
 
Reported: 2012-02-19 16:12 UTC by Helder
Modified: 2012-05-03 02:42 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Helder 2012-02-19 16:12:09 UTC
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.
Comment 1 Helder 2012-02-19 17:42:09 UTC
I noticed the same behavior when loading
https://meta.wikimedia.org/wiki/special:random
on metawiki but it do not happens if I use either
https://meta.wikimedia.org/wiki/special:random?debug=1
or
https://www.mediawiki.org/wiki/special:random?debug=1
Comment 2 Michael M. 2012-02-22 09:01:52 UTC
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.
Comment 3 Helder 2012-02-22 13:10:56 UTC
I'm not able to reproduce this anymore. Closing for now.
Comment 4 Mark A. Hershberger 2012-02-22 17:02:49 UTC
Agreed.  Can't reproduce.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links