How to detect a JavaScript error?

If you encounter any of the following front office functionality issues when testing one of our modules:

this may have several causes, including a JavaScript error in the module, theme or another script. The console helps identify the affected file, but does not always establish the root cause.

JavaScript errors can be silent on the page: the technical message is then visible in the Console. But, so that we can know what caused the error, we need you to send us a screenshot of the error. Here is the procedure for displaying the error clearly:

One of the features issues listed above is matching, then apply this procedure:

If needed to identify original files, temporarily disable Smart cache for JavaScript under Advanced Parameters > Performance > CCC. You can start by inspecting the console without changing this setting.

- Then go back to the front-office of your store, right click and select "Inspect":

The development tool console opens. Click the "Console" tab.

Go to the page concerned and reproduce the problem (e.g. if it's clicking on a button that doesn't work, re-click on the button; if it's triggering a tracking tag when the order confirmation page is displayed, re-place an order to bring up an order confirmation page again).

If a javascript error exists, one or more red errors will appear in the window, such as :

JavaScript error in Console: message, script.js source and line57

Make a screenshot of the errors and send it to us via our contact form, we will help identify its origin and the next diagnostic steps.

Change Smart cache for JavaScript only temporarily for diagnosis, when needed to identify original files, then restore its original setting. You can inspect the console first without changing this setting. If no error appears, also send the reproduction steps; an empty console does not prove that the feature works.

Teaching example triggered on the official Chrome demo. Record the message, source file and line. This example does not identify an error specific to your module.

Other FAQs in this category