Where i find this window.location.href = with window.top.location.href = ?

Highlighted
Shopify Partner
1 0 0

Hi I have this error when i click on customize theme this error comes up. Please help me to resolve this issue. The error is below:

"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."

https://www.screencast.com/t/2NK05bSt1qLj

0 Likes
Highlighted
Tourist
4 0 1

Just download Atom.io and search, and replace. That's it. A great help from rickydazla
Mine is "window.location.href", so I just replace "windows.top.location.href". It works : )

0 Likes
Highlighted
New Member
2 0 0

Online Store - Themes - Actions - Download theme file - send email - (go and download from your email) - Using Sublime Text or any text editor search folder - input the keyword "window.location.href" - find the file name - go back to Themes in Shopify - Edit code - go to the file and find "window.location.href" - and replace. 

 

This was the easiest way to find the file that included "window.location.href".

Hope it helps!

0 Likes
Highlighted
New Member
1 0 0

Thanks Brother. This a great idea to solve this problem. I recommended this solution to every person who have face this problem. 

0 Likes
Highlighted
New Member
1 0 0

I replaced all the "window.location.href" with "window.top.location.href" and I'm still getting the same error when I check out. I included a screen shot that shows the correct code. What else can I try?

Screen Shot 2020-08-25 at 8.20.47 PM.png

0 Likes
Highlighted
New Member
2 0 0

Can someone please help me? I am having the same issue. 

I cannot find the place where ''window.location.href'' is to change. I downloaded the theme, by having it emailed to me and search Find it and nothing came up, I cannot find where that is! 

Please, can someone tell me where it is or how to change it?! 

0 Likes