Last modified: 2009-09-21 09:09:22 UTC
Main (system) JavaScript variables suddenly at the end of the head tag, after MediaWiki:Common.js etc. This recent change (occured with code update today) breaks efficient scripts that rely on variables like wgStableRevisionId on runtime/loadtime! Example: <script type="text/javascript"> var wgFlaggedRevsParams = {"tags": {"accuracy": 2}}; var wgStableRevisionId = 1068025; var wgAjaxReview = {"sendingMsg": "Übertragung …", "sentMsgOk": "Markierung gesetzt ✔", "sentMsgBad": "Markierung konnte nicht gesetzt werden!", "actioncomplete": "Aktion beendet", "actionfailed": "Aktion fehlgeschlagen"} </script> <script type="text/javascript" src="/w/extensions/FlaggedRevs/flaggedrevs.js?60"></script> </head>
Variables: place them in front of the wikibits.js inclusion, they should at least be available for gadgets and following scripts.
Something in OutputPage.php changed the order it seems.
We chatted briefly on this in IRC; current recommendation is to move the vars into the MakeGlobalVariablesScript hook so they'll show up in the main variable block, which is guaranteed to come before other JS inclusions.
Fixed in r56553
Not quite sure, but shouldn't the line <script type="text/javascript" src="/w/extensions/FlaggedRevs/flaggedrevs.js?60"></script> come directly after the core scripts? At the moment it comes last (</head>); maybe there is a reason for this, but if not it should be grouped with all the other core & extension scripts (like centralnotice.js e.g.). See also bug 20720 ("Change script loading order back")