Last modified: 2012-05-03 02:42:49 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 T35760, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33760 - [Regression] mediawiki.legacy.wikibits uses mw.util, dependency missing
[Regression] mediawiki.legacy.wikibits uses mw.util, dependency missing
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.20.x
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: ---


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

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 [http://commons.wikimedia.beta.wmflabs.org/wiki/User:Rillke/common.js common.js].

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

Error:
mw.util is undefined
http://commons.wikimedia.beta.wmflabs.org/w/load.php?debug=false&lang=en&modules=jquery.client%7Cmediawiki.legacy.wikibits%7Cmediawiki.page.startup&skin=vector&version=20120111T105301Z&*
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
(wikibits.js)
window.importScript = function( page ) {
	var uri = mw.config.get( 'wgScript' ) + '?title=' +
		mw.util.wikiUrlencode( page ) +
		'&action=raw&ctype=text/javascript';
	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.


Navigation
Links