Last modified: 2012-02-20 00:57:37 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 T36485, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 34485 - modules loaded with using() fail in debug mode
modules loaded with using() fail in debug mode
Status: NEW
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.20.x
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://de.wikipedia.beta.wmflabs.org
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-18 01:31 UTC by Bergi
Modified: 2012-02-20 00:57 UTC (History)
7 users (show)

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


Attachments

Description Bergi 2012-02-18 01:31:11 UTC
I just wanted to test MediaWiki:Group-sysop.js at beta.wmflabs.org. At first it didn't seem to work so I switched to &debug=true mode to be able to set linewise breakpoints etc.

Surprise, surprise: It didn't work in debug mode, even if the code was correct. It took some time until I figured out what the problem was:

The callback function of mw.loader.using() was called when the script arrived. But in debug mode it's only a script that implements modules by pointing to their indivial URLs, to load the modules separately. Even though the functionality (jQuery.byteLimit in my case) was not available yet, it got used - and hence my script broke.
Without debug mode it works :-(
Comment 1 Mark A. Hershberger 2012-02-18 19:28:23 UTC
could you test this on one of the wiki's that have already moved to 1.19?  See https://www.mediawiki.org/wiki/MediaWiki_1.19/Roadmap#Deployment_schedule for the schedule and where this has already happened.
Comment 2 Bergi 2012-02-18 19:55:04 UTC
Uh, I thought the wmflabs wikis ran 1.19? But according to http://de.wikipedia.beta.wmflabs.org/wiki/Spezial:Version they've already got 1.20alpha.

The snippet works at test2.wikipedia.org, so you may lower the priority again.
Comment 3 Michael M. 2012-02-19 09:07:25 UTC
I think that this is the bug already documented in the source with
 //FIXME: that's a lie. doc.write isn't actually synchronous
(https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/resources/mediawiki/mediawiki.js?revision=111697&view=markup#l687)
Comment 4 Tim Starling 2012-02-20 00:57:37 UTC
Lowering priority.

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


Navigation
Links