JavaScript Errors

Learn how to handle JavaScript issues and prevent errors.

Almost every Joomla extension uses JavaScript, relying on a library like jQuery. Using different scripts on a webpage can cause conflicts between them.


How to Detect Errors?

If your website does not work as you expect when you click something or an animation stopped working, this could be due to a script error. In this case the script execution will be stopped by the browser.

The following developer tools show you script-errors including information about what went wrong, the file and line number and the source code that caused the error.

Developer Tools Description
Browser Debug Console One way is using the browser's debug console on the page where the error occurs. It will help you to identify the scripts and their related files on your webserver.
Firebug and other browser WDT Firebug for Firefox allows you to inspect and non-destructively edit HTML and also includes a powerful JavaScript debugger. Other browsers like Chrome, Safari or Opera already have similar built-in tools.

How to Resolve Errors?

Usually the errors are caused by an extension or combination of multiple extensions. If you've detected a JavaScript error on a page, you need to find its origin.

  1. Once you have identified the extension, try to disable it to make sure your page works without any errors again.
  2. If the error is gone, you've found the extension causing the conflict.
  3. Now you can look for the extensions configuration option and see, if it lets you enable/disable loading a JavaScript library like jQuery to resolve the errors.
Widgetkit Documentation