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

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 33760 - [Regression] mediawiki.legacy.wikibits uses mw.util, dependency missing
[Regression] mediawiki.legacy.wikibits uses mw.util, dependency missing
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
All All
: Normal normal (vote)
: 1.19.0 release
Assigned To: Krinkle
: patch, patch-reviewed
Depends on:
Blocks: 31217
  Show dependency treegraph
Reported: 2012-01-16 17:55 UTC by Rainer Rillke @commons.wikimedia
Modified: 2012-05-03 02:42 UTC (History)
2 users (show)

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

Proposal: Add a dependency to /mediawiki/trunk/phase3/resources/Resources.php (581 bytes, patch)
2012-01-20 11:38 UTC, Rainer Rillke @commons.wikimedia

Description Rainer Rillke @commons.wikimedia 2012-01-16 17:55:40 UTC
In Bug 33711, Krinkle said it is the way to go that we have to add dependencies for mw.util. But mediawiki.legacy.wikibits uses this module and does not wait and fails in non-debug-mode only. The following line was extracted by firebug:

'windows')!=-1;window.is_ff2_x11=is_ff2&&clientPC.indexOf('x11')!=-1;window.is_opera=window.is_opera_preseven=window.is_opera_95=window.opera6_bugs=window.opera7_bugs=window.opera95_bugs=false;if(clientPC.indexOf('opera')!=-1){window.is_opera=true;window.is_opera_preseven=window.opera&&!document.childNodes;window.is_opera_seven=window.opera&&document.childNodes;window.is_opera_95=/opera\/(9\.[5-9]|[1-9][0-9])/.test(clientPC);window.opera6_bugs=is_opera_preseven;window.opera7_bugs=is_opera_seven&&!is_opera_95;window.opera95_bugs=/opera\/(9\.5)/.test(clientPC);}window.ie6_bugs=false;if(/msie ([0-9]{1,}[\.0-9]{0,})/.exec(clientPC)!=null&&parseFloat(RegExp.$1)<=6.0){ie6_bugs=true;}window.doneOnloadHook=undefined;if(!window.onloadFuncts){window.onloadFuncts=[];}window.addOnloadHook=function(hookFunct){if(!doneOnloadHook){onloadFuncts[onloadFuncts.length]=hookFunct;}else{hookFunct();}};window.importScript=function(page){var uri=mw.config.get('wgScript')+'?title='+mw.util.wikiUrlencode(page)+

Note the mw.util.wikiUrlencode.
Comment 1 Rainer Rillke @commons.wikimedia 2012-01-16 18:01:27 UTC
I assume this happens because I have a call to importScript in my [ common.js].

But nevertheless mediawiki.legacy.wikibits should not expose a function that is not working.

mw.util is undefined*
Line 5
Comment 2 Rainer Rillke @commons.wikimedia 2012-01-20 11:38:04 UTC
Created attachment 9877 [details]
Proposal: Add a dependency to /mediawiki/trunk/phase3/resources/Resources.php

Did not check any deadlock possibility.
Comment 3 Krinkle 2012-01-20 11:50:42 UTC
window.importScript = function( page ) {
	var uri = mw.config.get( 'wgScript' ) + '?title=' +
		mw.util.wikiUrlencode( page ) +
	return importScriptURI( uri );

yes, it uses mw.util. Dependency must be added, no-brainer. Thanks!
Comment 4 Krinkle 2012-01-21 13:34:00 UTC
Applied among other missing dependencies in r109680.
Thank Rainer!

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