Page MenuHomePhabricator

Page reload gives error mw.getConfig is not a function
Closed, ResolvedPublic


Shift-reloading in FF 16.0.2/OS X 10.6.8 any page at the English Wikipedia using the monobook skin consistently gives me the following error:

Error: TypeError: mw.getConfig is not a function
Source File:*
Line: 1

The error consistently disappears if I switch on debug mode (&debug=true).

Appears to come from the mwEmbedPlayer loader inside the generated setup() function.

Version: unspecified
Severity: critical



Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 1:11 AM
bzimport set Reference to bz42192.

Also see [[en:Wikipedia:Village pump (technical)#Missing Gadgets Tab]].

Cannot reproduce with Ctrl+F5 in Firefox 16.0.2.

mdale wrote:

I was able to recreate only with the monobook skin.. Appears the resource loader is doing something strange, or at least inconsistent with debug mode and when vector skin is active.

To fix I switched usage to mw.config.get ( the master function ) so the mediaWiki.loader wrapping of mw.getConfig won't need to be loaded in time.

More reports on this at

Also, the "enhanced recent changes" (with the JS collapsing support) doesn't work; the collapsing JS evidently doesn't run.


IE8 on Win7 tells me the error was in line 0, column 529: that's exactly the mw.getConfig() I commented on in

Is it perhaps possible that the module providing this function arrives after DOM ready?

This is especially funny since getConfig() is provided by MwEmbedSupport, but used by TMH which gives another opportunity to shoot yourself on the foot due to borked dependencies. And it saves exactly one keystroke to type, not counting the Shift key; if we count it, we're even.

mdale wrote:

Thanks Max, tested and merged.

Note: mw.getConfig per-dated mw.config.get, and while we should have global updated name of the function earlier, its not good that the Resource Loader behaviour is differently in debug mode from production mode.