General Support - Troubleshooting - Detecting JavaScript Errors
Detecting JavaScript Errors
What are JavaScript Errors in WordPress?
- Flyout menus may be broken
- Metaboxes don't drag,
- Add media buttons aren't working.
Why Detecting Them Is Useful?
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:
- Chrome Error Console
- Firefox Web Console
- Internet Explorer Debugging Script
- Safari Develop Menu
- Opera Error Console
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.org has an in-depth tutorial on this issue.
- How to handle JavaScript errors by type
- The Top 10 JavaScript Errors
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 |