Shopify editor 'Issue with page redirect', but not able to locate window.location.href

Highlighted
New Member
2 0 1

I'm getting the following message when opening my theme in the shopify editor:

"Issue with page redirect

It looks like this page is redirecting to a page that isn't compatible with this editor. To ensure that your redirect doesn't interfere with the editing experience, replace window.location.href = with window.top.location.href = in your theme's JavaScript over here."

I have thoroughly search my theme (Supply (Version 7.0.1)) manually and using Atom.io and can't find any instance of window.location.href.

The error resulted after installing the 'Create member's only site code' from this tutorial:

https://help.shopify.com/en/themes/customization/access/create-members-only-store

I'm guessing the editor, (or just the warning) needs to be updated to better support the new sections in themes, but I'd like to fix the issue if possible.

 

0 Likes
Highlighted
Tourist
9 0 4

Do you find any solution ferretbee?  I have same problem and can't find a clue anywhere.  This issue came up after I added a shipping date picker in the shopping cart (Supply theme also).  It looks like we are not alone.

0 Likes
Highlighted
New Member
2 0 0

I am totally new and trying to set up my first store but I ran into this same exact thing as well. 

0 Likes
Highlighted
Tourist
9 0 4

I've found an answer here https://ecommerce.shopify.com/c/shopify-discussion/t/help-where-is-window-location-href-437622 but no sure how to do it yet.

"It will be in your theme JavaScript. Older themes, pre-Shopify Sections would have used the former. Any front-end dev might innocently do the same. It’s not a huge deal. If you can download a copy of your theme and open in a text editor like Atom.io you can search and replace."

 

0 Likes
Highlighted
New Member
2 0 1

I have not found a solution. The problem makes the editor unusable in FireFox, but in Chrome is minimal now. Shopify support basically told me to just use Chrome and ignore it.  I attempted to find the code using Atom.io as that post explained but never found the code.

 

 

Highlighted
Tourist
9 0 4

Same here ferretbee, can't find the codes with Atom.io as well.   It looks like a bigger problem than I thought with Shopify, so many people are stuck with it including myself.

Highlighted
New Member
2 0 0

hi there, 
was wondering if anyone is able to solve this issue?
I am having the same problem. :(

0 Likes
Highlighted
New Member
1 0 0

Hi! I have the same problem. I haved use Atom, finded the window.location.href = and changed for window.top.location.href = .

But the same message remains despite the code being replaced.

0 Likes
Highlighted
Tourist
4 0 1

Ditto. I'm having the same issue with my third party theme. I can't find this code anywhere to edit it out, window.top.location.href =.

I wish Shopify would address this issue head-on since it appears to be a growing problem for many.

Highlighted
Tourist
4 0 1

Hello,

 

I did finally find this piece of code using Atom.io. Found it in, sections/header.liquid, however, I haven't deleted it for fear of causing an additional problem for my theme. I do think it has something to do with my theme sticky header options. More to come.

0 Likes