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.
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024