Last modified: 2009-09-21 09:09:22 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 20690 - FlaggedRevs main (system) JavaScript variables suddenly at the end of the head tag, after MediaWiki:Common.js etc.; breaks scripts
FlaggedRevs main (system) JavaScript variables suddenly at the end of the hea...
Product: MediaWiki extensions
Classification: Unclassified
FlaggedRevs (Other open bugs)
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Aaron Schulz
: code-update-regression
Depends on:
  Show dependency treegraph
Reported: 2009-09-17 13:27 UTC by Melancholie
Modified: 2009-09-21 09:09 UTC (History)
2 users (show)

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


Description Melancholie 2009-09-17 13:27:03 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!

<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 type="text/javascript" src="/w/extensions/FlaggedRevs/flaggedrevs.js?60"></script>
Comment 1 Melancholie 2009-09-17 13:31:04 UTC
Variables: place them in front of the wikibits.js inclusion, they should at least be available for gadgets and following scripts.
Comment 2 Aaron Schulz 2009-09-17 15:58:17 UTC
Something in OutputPage.php changed the order it seems.
Comment 3 Brion Vibber 2009-09-17 18:32:22 UTC
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.
Comment 4 Aaron Schulz 2009-09-17 19:12:11 UTC
Fixed in r56553
Comment 5 Melancholie 2009-09-21 09:09:22 UTC
Not quite sure, but shouldn't the line

<script type="text/javascript"

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")

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