Page MenuHomePhabricator

Write a page explaining how to locate a broken script/gadget
Closed, ResolvedPublic

Assigned To
Authored By
Apr 21 2017, 10:04 AM
Referenced Files
F8014457: T163540_2.png
May 10 2017, 11:36 AM
F8014451: T163540_1.png
May 10 2017, 11:36 AM
"Barnstar" token, awarded by Qgil."Like" token, awarded by Whatamidoing-WMF."Like" token, awarded by Aklapper.


Event Timeline

The stock answer I normally use when trying to help people track down issues:

Could you please open your web browser's developer tools? After opening them, please append ?debug=true to the address of the page on which you see the problem, if the address does not already include a ?. (If the address already includes a ?, append &debug=true instead - more information).
If there is a problem or an error with JavaScript it should be printed in the 'console' of the developer tools and should also tell you the name of the file. Often JavaScript errors are a reason for problems, or a non-existing file called from another file (which can be seen in the 'network' tab).
For more information please see:

Maybe helpful...

There's the new safemode thing as well.

Elitre triaged this task as Lowest priority.Apr 26 2017, 5:10 PM

Tried to write a short text but afterwards realized that the steps in are already pretty good plus include a video.

Anyway, feel free to use. Only about tracking down and where to fix, not how to fix. For how to fix, see e.g. or the en.wp link above.

If you have problems with local gadgets or user scripts, these problems are often created by broken JavaScript code (the programming language that gadgets are written in) or undeclared dependencies on other code.

To track down the problematic code and place that needs fixing, open the developer tools of your web browser:

After opening them, please append ?debug=true to the web address (URL) of the page on which you see the problem, if the URL does not already include a ?. If the URL already includes a ?, append &debug=true instead. (For more technical information you can check but you do not have to read that to follow the next steps.)

If there is a problem with JavaScript, an error should be printed in the 'console' of the developer tools (make sure that "JavaScript" or "JS" is enabled here, and potentially disable other output so the output does not get too noisy):

T163540_1.png (643×1 px, 84 KB)

Click on the file name on the right. This will open the "Debugger" view. The right pane will show the code which needs to be fixed. The left pane will show which file needs to be fixed (you might need to scroll through the list to find the one file that is highlighted). Right-click on the file, to open the file that needs fixing in a new tab:

T163540_2.png (644×1 px, 131 KB)

Due to how files are "loaded", the exact URL of the file might not always be obvious. So you may have to scroll to the top of the file to see its name.

Problems that need fixing could be in the local MediaWiki:Common.js file on that wiki, in your personal files such as User:MyUserName/common.js (or other .js files that you have under User:MyUserName/), or in the code of one of the gadgets available on that wiki, or in the code dependency definitions of the gadget defined in MediaWiki:Gadgets-definition on that wiki.

We don't have a place to post this on MediaWiki wiki and we can't drop it on wiki like this. I'm sad.

Any suggestions on a page name at

This comment was removed by Trizek-WMF.

I kind of like option (b), on the grounds that the support desk probably needs to use this page.

Option (a) requires CC-0 licensing, which means that only @SoWhy could add that great description from VPT's archives.

Option (a) requires CC-0 licensing, which means that only @SoWhy could add that great description from VPT's archives.

Unsure what you need exactly but if it's a licensing issue, you can use my stuff with any license you want (I hereby declare those videos I made and posted on en-wiki's VPT page public domain)

I add that user will probably need to clear local browser cache if he add &debug or &safemode.

@Framawiki: Did you maybe mean "bypass", or really "clear"? Because I've never cleared my browser cache here...

Yes, bypass (ctrl+f5). I just say this because I forgot to do it for T164908. Thanks.

Trizek-WMF added a subscriber: Whatamidoing-WMF.

Andre and I still see many debugging requests on the wikis (or have come directly), so I'm working on this page in the hackathon. I'm also using it as an example for how to mark a page for translation.

Trizek-WMF raised the priority of this task from Lowest to Medium.

The page has been set. It is not perfect, but it is already possible to identify the problem and have ideas how to fix them temporary by disabling or commenting the scripts. The page is ready for translation.
Improvements for more advances fixes or cases should be done in subpages.

Andre, as we discussed, your turn to review the doc and see possible improvements. :)

(+ raising the priority to reflect the fact that communities have troubles and we may have more troubles soon due to new depreciated elements.)

While the page hasn't been edited since a while, I'll send a message to translators soon, unless if @Aklapper says no. :)

Added one more sentence in linking to some how-to-fix info/links in T164242, as I don't have the time to write the prosa myself (plus would be duplication).

Boldly setting task to resolved. Thanks everybody!

Page sent to translators and ambassadors.