Page MenuHomePhabricator

modules loaded with using() fail in debug mode
Closed, ResolvedPublic


Author: a.d.bergi

I just wanted to test MediaWiki:Group-sysop.js at 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 :-(

Version: 1.20.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:10 AM
bzimport set Reference to bz34485.
bzimport added a subscriber: Unknown Object (MLST).

could you test this on one of the wiki's that have already moved to 1.19? See for the schedule and where this has already happened.

a.d.bergi wrote:

Uh, I thought the wmflabs wikis ran 1.19? But according to they've already got 1.20alpha.

The snippet works at, so you may lower the priority again.

I think that this is the bug already documented in the source with
//FIXME: that's a lie. doc.write isn't actually synchronous

Lowering priority.

Krinkle closed this task as Resolved.Jan 5 2015, 3:29 PM
Krinkle claimed this task.

I can't reproduce this on latest MediaWiki master. Please re-open if you can reproduce this issue.