/

General Support - Troubleshooting - Detecting JavaScript Errors


Detecting JavaScript Errors

Back to User Guides

What are JavaScript Errors in WordPress?

WordPress gives the following examples of issues likely caused by JavaScript errors:
  • Flyout menus may be broken
  • Metaboxes don't drag,
  • Add media buttons aren't working. 

Why Detecting Them Is Useful?

Checking these errors will be one of the first thing technical support will work on. 
So, even if you are not tech-savvy, following these steps can be useful as you will retrieve valuable information that can result in quickly fixing eventual issues.

Debugging: Step by Step

These steps should be taken in strict order. Make sure to take note of all results.

1) Test Different Browsers

To begin isolating the problem, try different browsers - Chrome, Safari, Internet Explorer, Edge, Mozilla Firefox and so on.

If the problem happens only with certain browsers, it's likely there is a compatibility issue. However, if all browsers present the error, there is another underlying issue.

2) Enable SCRIPT_DEBUG

Script Debug is a feature that forces WordPress to use the complete versions of some core CSS and JavaScript files rather than the minified versions that are normally loaded. More information on script debugging

To enable it, open the wp-config.php and add the following line before "That's all, stop editing! Happy blogging", as highlighted

define('SCRIPT_DEBUG', true);

Now, refresh WordPress and check if the problem persists.

3) Diagnosis

Every browser has a feature that shows the error console, in which you can find more specific information about the JavaScript. An example of error as reported in the Chrome Console:

Each error console has a slightly different interface, and the way to activate it also changes. Learn more about each:

Copy this information. It should include the error, its location and context.

4) Report

Combine all the information that you have gathered and present it. The more complete it is, the more you will assist the technical support.


Additional Resources



WordPress products can be found at  CreativeMinds WordPress Store

Let us know how we can  Improve this Product Documentation Page 

To open a  Support Ticket visit our support center