Help:Locating broken scripts
To track down the problematic code and place that needs fixing, you will have to use the developer tools of your web browser. This tool, combined with a special URL, will help you to identify the broken scripts.
Be sure you have an up-to-date configuration
First, ensure your browser is up to date. MediaWiki features and some scripts are not supported by old browsers for safety reasons.
Then, purge the cache for the page to force the page to be redisplayed from its source or scripts to restart.
Those two points solve most issues.
To test if your problem is linked to user scripts or gadgets, you can try to temporarily deactivate all on-wiki scripts at once.
To do so, add
?safemode=1 to the web address (URL) of the page on which you see the problem. Example:
If the URL already includes a
&safemode=1 instead. Example:
If you still have problems on the page you are testing with the safe mode, and your browser is up to date, please contact a developer of MediaWiki (How to report a bug). If you don't have the problem anymore using the safe mode, it means you have an issue with a user script or gadget. You have to identify the problem.
Identify the problems
After opening them, please append
?debug=true to the web address (URL) of the page on which you see the problem. Example:
If the URL already includes a
&debug=true instead. Example:
For more technical information you can check how to Toggle debug mode (but you do not have to read that to follow the next steps.)
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:
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.
This name may just be a comment (something like
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.
Fix the problem
You will find most of the scripts by looking in m:Special:MyPage/global.js on Meta, and locally
Special:MyPage/common.js, Special:MyPage/vector.js (or similarly named pages, if you are using a different skin, such as Special:MyPage/monobook.js if you are using the MonoBook skin), and anything that is selected locally in the
In the meantime, you can disable the scripts.
If the broken script is identified as a gadget, disable the gadget in your preferences.
If the broken script is on a .js page or yours, disable the script by commenting it out. Add
/* at the beginning of the concerned code and
*/ at the end.
You can also disable the script by blanking all of the lines about it in your .js page.
Others ways to identify broken scripts
- note the gadgets and scripts you are using on your account
- disable all scripts and gadgets on your account
- re-enable one gadget
- clear your cache
- test if you still have problems:
- If not, go to step 3
- If yes, fix the script and go back to step 3 for other potentially broken scripts