Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello All
I am having a problem accessing my theme editor, pretty sure its an app as I have downloaded another theme but still have the same issue
I get this error message:
This page is not compatible with the editor due to one of the following issues:
I searched and found out the below part could help, but I can not find where to make the changes (in the JavaScript code of your theme).
To disable the redirects, make sure to replace “window.location.href =” with “window.parent.location.href =” in the JavaScript code of your theme. Or else, you can use a reference to the window.Shopify.designMode variable in JavaScript.
Can anyone please point me the right direction where to change the window.location.href = and on what file please.
Hi @NewDawnUK
window.Shopify.designMode variable is used to detect if the theme is being viewed in the Shopify editor. You can add conditional logic to avoid redirects when in the editor. For example:
if (!window.Shopify || !window.Shopify.designMode) {
window.location.href = "your-redirect-url";
}
If you still can't find the issue, it's worth disabling apps one by one to identify if an app is causing the problem. Some apps inject scripts that could cause conflicts with the editor.
Starting a B2B store is a big undertaking that requires careful planning and execution. W...
By JasonH Sep 23, 2024By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024