Last modified: 2014-11-17 10:35:21 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 T31608, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 29608 - Dependencies break when mixing JS files and WikiModules, when debug=true
Dependencies break when mixing JS files and WikiModules, when debug=true
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.17.x
All All
: High normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-27 13:20 UTC by Jan Paul Posma
Modified: 2014-11-17 10:35 UTC (History)
6 users (show)

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


Attachments

Description Jan Paul Posma 2011-06-27 13:20:21 UTC
When mixing Javascript files and ResourceLoaderWikiModule, the execution order is incorrect. JS scripts from ResourceLoaderWikiModule are loaded inline, and are executed before the files are executed.

When debug=false, there is no problem, as files are also included as inline JS (in load.php). The problem only occurs when mixing the two types of inclusion.

Can be reproduced by checking out r90873, installing WikiLove, adding a mw.log statement to MediaWiki:WikiLove.js and to extensions/WikiLove/modules/ext.wikiLove/ext.wikiLove.defaultOptions.js. Obviously the latter should be executed first, and then the site-specific JS can overwrite options. However, when setting debug=true, one will find that the latter is executed before MediaWiki:WikiLove.js, which is wrong.
Comment 1 Roan Kattouw 2011-06-27 13:23:41 UTC
Wasn't this also a CR comment + fixme on a revision somewhere?
Comment 2 Roan Kattouw 2011-06-27 13:30:14 UTC
(In reply to comment #1)
> Wasn't this also a CR comment + fixme on a revision somewhere?
Found it: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Special:Code/MediaWiki/88053#c17169
Comment 3 Krinkle 2011-09-05 23:47:37 UTC
Summarized, afaik the solution is to do the same for wiki modules as we do for files in debug mode: Load them from a url, with only=scripts
Comment 4 Roan Kattouw 2011-11-19 17:38:36 UTC
This was fixed in r96978.

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


Navigation
Links