Help:Locating broken scripts/id

Apabila Anda mengalami gangguan pada gawai lokal atau skrip pengguna, hal ini sering disebabkan oleh rusaknya kode JavaScript (bahasa pemrograman yang digunakan untuk menulis kode gawai) atau adanya dependensi yang tidak dideklarasikan pada kode yang lain.

Untuk melacak kode itu dan lokasinya, Anda harus menggunakan perkakas pengembang dari peramban web Anda. Perkakas ini, dibantu dengan pranala khusus, akan membantu Anda mengidentifikasi skrip yang rusak.

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.

If you have a tool like "NoScript" or ad blockers installed on your web browser, then make certain that scripts are enabled for wikipedia.org, wikimedia.org, mediawiki.org, and wikidata.org.

Test if you have problems related to user scripts or gadgets
To test if your problem is linked to user scripts or gadgets, you can try to temporarily deactivate all on-wiki scripts and stylesheets at once.

To do so, add the parameter  to the web address (URL) of the page on which you see the problem. Example:

If the URL already includes a , append  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.

Test if you have problems related to browser extension
Some issues may be a result of interaction between Wikipedia and some browser extension. The easiest way to test it, is to try the same action with all extensions disabled, and the easiest way to achieve this, at least with the google chrome and firefox browsers, is to repeat the operation using "anonymous browsing", where the browser disables all extensions by default. If the issue disappears with anonymous browsing, try to narrow it down by temporarily disabling extensions one by one, until the "culprit" extension is found.

If you find that the problem is indeed related to a browser extension, consider reporting it to the extension developers. If you decide to report it on Wikipedia, please mention this fact in the report.

Identify the problems
The following links explain how to do this for the following browsers:
 * Chrome/Chromium
 * Firefox
 * Internet Explorer
 * Opera
 * Safari

After opening them, please append   to the web address (URL) of the page on which you see the problem. Example:

If the URL already includes a , append  instead. Example:

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:



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 ), 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.

For more technical information you can check how to Toggle debug mode.

Fix the problem
You will find most of the scripts by looking in m:Special:MyPage/global.js on Meta, and locally, 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.

Problem on scripts can be due to multiple causes. We advise you to contact someone who knows JavaScript to help you. (If you have basic technical knowledge of JavaScript, see T164242 for hints and links to additional information.)

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 or by commenting out by  at the start of each line concerned.

Cara lain untuk mengenali skrip yang rusak

 * 1) tandai gawai dan skrip yang Anda gunakan pada akun Anda
 * 2) matikan semua skrip dan gawai pada akun Anda
 * 3) aktifkan lagi satu gawai
 * 4) kosongkan tembolok Anda
 * 5) uji kembali untuk melihat apakah masih bermasalah:
 * 6) * Jika tidak bermasalah, ulangi langkah 3
 * 7) * Jika masih bermasalah, perbaiki skrip itu dan kembali pada langkah 3 untuk mencari skrip bermasalah lainnya

Gawai yang tidak berhubungan sama sekali dapat merusak semuanya. Untuk mempersempit pencarian, matikan semua gawai dalam bagian tertentu dari daftar gawai di preferensi, dan periksa apakah hal tersebut membantu. Jika tidak membantu, coba matikan gawai dari bagian yang lain. Pada akhirnya, Anda akan menemukan bagian gawai yang menjadi sumber masalahnya. Matikan gawai dari bagian itu satu per satu. Sebelum melakukan hal ini, gunakan fitur tangkapan layar untuk berjaga-jaga. Hal ini akan memudahkan Anda kembali ke pengaturan sebelumnya. Firefox mempunyai perkakas menangkap layar yang dapat mengambil tangkapan layar, termasuk bagian yang tidak tampak di layar.

Lihat pula

 * ResourceLoader/Architecture § Disable on a single page