Page MenuHomePhabricator

Global user JS doesn't load in debug mode (?debug=1)
Closed, DuplicatePublicBUG REPORT

Description

List of steps to reproduce:

  1. Check your global.js on Meta. Either add console.log('global.js'); there or identify some code there that has a discernable effect on wiki pages (you will need it to verify that global user JS has loaded).
  2. Go to https://en.wikipedia.org/wiki/Test?debug=1 (or any wiki other page with ?debug=1 in the URL).
  3. Check that your global user JS has loaded.

What happens?:
Global user JS does not load.

What should have happened instead?:
Global user JS should indeed load.

Details:
I checked it in Chrome, @SerDIDG, who found this bug, checked it in Firefox. I looked at the requests in DevTools, and I saw a request to https://meta.wikimedia.org/w/load.php?debug=1&lang=en&modules=ext.globalCssJs.user&skin=vector&user=Jack+who+built+the+house&version=1tm4h which is supposed to fetch the global.js. But the response was:

mw.loader.implement( "ext.globalCssJs.user@96o4l", [
    "/w/load.php?debug=1\u0026lang=en\u0026modules=ext.globalCssJs.user\u0026only=scripts\u0026skin=vector\u0026user=Jack+who+built+the+house\u0026version=1tm4h"
] );

No data.

On the other hand, if I remove debug=1& from the URL, the response is correct, see https://meta.wikimedia.org/w/load.php?lang=en&modules=ext.globalCssJs.user&skin=vector&user=Jack+who+built+the+house&version=1tm4h.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jack_who_built_the_house renamed this task from Meta's global.js doesn't load in debug mode (?debug=1) to Global user JS doesn't load in debug mode (?debug=1).Sep 18 2021, 4:23 PM
Jack_who_built_the_house updated the task description. (Show Details)
Jack_who_built_the_house updated the task description. (Show Details)

What is interesting is that global user CSS does load.

Krinkle subscribed.

Thanks for reporting. This bug has been fixed last week, and will be rolled out in the next 2-3 days to WMF production as part of the "1.38.0-wmf.1" branch.