Last modified: 2012-01-14 10:41:05 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 T35669, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33669 - "importScriptURI is not defined" with monobook skin
"importScriptURI is not defined" with monobook skin
Status: RESOLVED DUPLICATE of bug 33711
Product: MediaWiki
Classification: Unclassified
ResourceLoader (Other open bugs)
1.20.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-11 20:41 UTC by Mark A. Hershberger
Modified: 2012-01-14 10:41 UTC (History)
5 users (show)

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


Attachments

Description Mark A. Hershberger 2012-01-11 20:41:15 UTC
http://commons.wikimedia.deployment.wmflabs.org/wiki/File:P14.png?useskin=monobook&debug=true reveals the following on the JS console: "importScriptURI is not defined"
Comment 1 Sam Reed (reedy) 2012-01-11 22:39:27 UTC
I don't get this on my dev wiki, but I do get the other 2 errors..
Comment 2 Mark A. Hershberger 2012-01-12 02:23:02 UTC
I *think* it may have something in the Gadgets .... testing.
Comment 3 Mark A. Hershberger 2012-01-12 02:54:48 UTC
logged out on chrome, I see the error. logged in with all gadgets disabled, I see the error.

I see it with gadgets disabled on http://commons.wikimedia.deployment.wmflabs.org/wiki/File:Javascript-wikibooks-pt.pdf?debug=true&useskin=monobook but not on http://commons.wikimedia.deployment.wmflabs.org/wiki/File:Javascript-wikibooks-pt.pdf?debug=true
Comment 4 Rainer Rillke @commons.wikimedia 2012-01-12 22:28:13 UTC
This is/was because of http://commons.wikimedia.deployment.wmflabs.org/wiki/MediaWiki:Monobook.js?useskin=monobook

importScriptURI and importScript aren't supported by natively MediaWiki anymore. But http://commons.wikimedia.deployment.wmflabs.org/wiki/MediaWiki:Common.js tries to emulate them.

Since mw.loader.util is undefined when http://commons.wikimedia.deployment.wmflabs.org/wiki/MediaWiki:Common.js is loaded, I wrapped a loader-call around the whole js.

This caused that common.js-code was executed after monobook.js; thus importScriptURI & Co. were undefined.

So there is the question whether it is intended that mw.util is initialized after common.js is loaded and why mw.util.$content is still null despite all code is wrapped inside the loader-module.
Comment 5 Erwin Dokter 2012-01-13 14:56:04 UTC
mw.util should be loaded on top of everything, so there definitely seems to be a ResourceLoader related problem. I get several undefined errors for various modules and plugins (e.g. $.cookies) on the enwiki deployment.
Comment 6 Erwin Dokter 2012-01-14 10:21:08 UTC
Reopening this; Wrapping common.js in mw.loder is horrible kludge, and the loading order of common > skin JS should not be changed.
Comment 7 Erwin Dokter 2012-01-14 10:41:05 UTC
Spoke too soon.

*** This bug has been marked as a duplicate of bug 33711 ***

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


Navigation
Links