MDN wants to learn about developers like you:

翻譯不完整。請協助 翻譯此英文文件

網頁上出現一塊又大又醜的 KumaScript 錯誤會惹惱讀者,好險任何擁有 MDN 帳號的人,可以編輯文件來修復錯誤。當一個頁面出現錯誤的時候,該面會被列在有錯誤的文件裡面。網站編輯者會透過這份清單,找出並修復錯誤。這篇文章列出 KumaScript 錯誤的四種類型,還有解決他們的步驟。


DocumentParsingError errors appear when KumaScript has trouble understanding something in the document itself. The most common cause is a syntax error in a macro.

Check for:

Use of curly braces without intending to call a macro.
If you need to write  { in a document without calling a macro you can escape it with a \ like this: \{
Use of a special character in a macro parameter.
If you need to use a " or a \  inside of a macro parameter they can be escaped with a \ like this: \\ or \"
Missing commas between macro parameters.
Macro parameters need to be delimited by a comma (,) but not at the end of the list of parameters; for example {{anch("top", "Back to top")}}.
HTML tags appearing inside a macro call
If you apply styling to a macro, it will often break because, for example, a </code> tag may have appeared inside the macro code in the source code. Check the source view to see what's there, and remove any unnecessary styling.


TemplateLoadingError errors appear when KumaScript has trouble finding which macro to include on a page.

Check for:

Misspelling of macro names or renamed macros.
You can try visiting the template page for the macro to see if it's named correctly. The URL for the template page can be constructed by adding the template name to the end of the URL — for example the template page for {{anch("top", "Back to top")}}  is

There is a partial list of macros for the MDN, which may include the existing macro you are looking at, or its correct/new spelling.

Tip: You can make it quick and easy to jump to a specific macro by adding a search keyword to Firefox. <<<MORE SOON>>


TemplateExecutionError errors appear when KumaScript encounters an error in the macro. These errors can only be fixed by admin users and need to be reported as bugs.

Before reporting an error check to see that it hasn't already been fixed. You can do this by forcing KumaScript to give you a fresh copy of the page by holding down Shift while you refresh the page (Shift + Ctrl + R on Windows/Linux, Shift + Cmd + R on Mac).

If the error persists, report a bug, including the URL of the page and the text of the error.



Check for fixes and report persistent bugs like described under TemplateExecutionError.




 此頁面的貢獻者: jackblackevo, iigmir, alk03073135
 最近更新: iigmir,