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

Description

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: https://bits.wikimedia.org/en.wikipedia.org/load.php?debug=false&lang=en&modules=startup&only=scripts&skin=monobook&*
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

Lupo created this task.Via LegacyNov 16 2012, 12:28 PM
Lupo added a comment.Via ConduitNov 16 2012, 12:48 PM

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

Aklapper added a comment.Via ConduitNov 16 2012, 2:51 PM

Cannot reproduce with Ctrl+F5 in Firefox 16.0.2.

bzimport added a comment.Via ConduitNov 16 2012, 3:50 PM

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.

https://gerrit.wikimedia.org/r/33728

Lupo added a comment.Via ConduitNov 16 2012, 9:27 PM

More reports on this at

https://en.wikipedia.org/wiki/Wikipedia:Village_pump_%28technical%29#Hotcat_not_working

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

Lupo added a comment.Via ConduitNov 16 2012, 9:35 PM

Michael:

IE8 on Win7 tells me the error was in line 0, column 529: that's exactly the mw.getConfig() I commented on in https://gerrit.wikimedia.org/r/#/c/33210/

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

MaxSem added a comment.Via ConduitNov 16 2012, 9:56 PM

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.

bzimport added a comment.Via ConduitNov 16 2012, 10:24 PM

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.

MaxSem added a comment.Via ConduitNov 16 2012, 11:06 PM

Deployed.

Gilles added a project: Multimedia.Via WebNov 24 2014, 3:19 PM
Gilles moved this task to Closed on the Multimedia workboard.Via WebDec 2 2014, 8:55 AM

Add Comment