Last modified: 2013-04-22 16:15:06 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 T44192, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42192 - Page reload gives error mw.getConfig is not a function
Page reload gives error mw.getConfig is not a function
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
TimedMediaHandler (Other open bugs)
unspecified
All All
: Highest critical (vote)
: ---
Assigned To: Michael Dale
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-16 12:28 UTC by Lupo
Modified: 2013-04-22 16:15 UTC (History)
5 users (show)

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


Attachments

Description Lupo 2012-11-16 12:28:17 UTC
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.
Comment 1 Lupo 2012-11-16 12:48:22 UTC
Also see [[en:Wikipedia:Village pump (technical)#Missing Gadgets Tab]].
Comment 2 Andre Klapper 2012-11-16 14:51:45 UTC
Cannot reproduce with Ctrl+F5 in Firefox 16.0.2.
Comment 3 Michael Dale 2012-11-16 15:50:12 UTC
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
Comment 4 Lupo 2012-11-16 21:27:58 UTC
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.
Comment 5 Lupo 2012-11-16 21:35:06 UTC
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?
Comment 6 Max Semenik 2012-11-16 21:56:02 UTC
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.
Comment 7 Max Semenik 2012-11-16 22:00:40 UTC
https://gerrit.wikimedia.org/r/33819
Comment 8 Michael Dale 2012-11-16 22:24:21 UTC
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.
Comment 9 Max Semenik 2012-11-16 23:06:34 UTC
Deployed.

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


Navigation
Links