Troubleshooting

Review the following common issues that you might experience with your theme editor, and how to resolve them. If you are experiencing issues with your theme editor, then check if your issue a ppearsbelow.

Page is redirecting to an unsupported URL

If your storefront includes code that redirects users to URLs that aren't connected to your shop, then verify that the redirect has been deactivated when you visit the theme editor.

For example, this type of redirect might be added to a storefront to direct customers to different Shopify stores depending on their location. This type of redirect code could exist in either your theme or an app that you installed.

To ensure your redirect doesn't interfere with the editor experience, use a reference to the window.Shopify.designMode variable in JavaScript to deactivate the redirect when you visit the theme editor. This variable is set to true when the storefront is loaded in the editor, and false when it isn't.

Page failed to load due to an error

A page can fail to load in the theme editor for many reasons. Common issues include the following:

  • network connection issues
  • invalid Liquid code in your theme

If you have verified that these issues aren't causing the error, then try visiting your online store by navigating to Theme actions > Preview theme in the theme editor. If the page fails to load, then you can contact Shopify Support for help with your storefront.

HTML error found

If there's an syntax error in your theme code, then an HTML error found warning message displays in your theme editor.

To resolve the error, examine the code in the Liquid file that's referenced in the error message.

Finding the problem in your theme code

  1. Click the .liquid section file that is linked in the error message. This will take you to the Edit HTML/CSS page, and the file will open in the code editor.
  2. Look through the code in the file and try to find invalid HTML or Liquid. The code editor will display potential syntax errors in red. Common problems include the following:
    • Extra closing HTML tags, for example, a closing </div> without an opening <div>
    • Extra unclosed HTML tags, for example, an opening <div> without a closing </div>
    • Malformed HTML tags, for example, <div class="my-class" without a >
    • Malformed Liquid code
    • Broken HTML in an included theme snippet file
  3. After you've found the problem, correct the code in your theme file.
  4. Click Save.
  5. Click Customize to return to the theme editor, and confirm that the error message is gone.

Other solutions

If you're still experiencing issues with your theme after reviewing the common troubleshooting steps, then then consider the following options:

Ready to start selling with Shopify?Try it free