Theme preview not showing changes pushed from Shopify CLI

Theme preview not showing changes pushed from Shopify CLI

Xavier_Haddon
Visitor
1 0 1

I've been searching for a solution to this problem for a few days, but I can't seem to find anything about it online even though it's been happening consistently. Basically, whenever I make a change to a theme via the admin panel or theme customizer and then pull that change to my local environment with the Shopify CLI, the previewer ceases to reflect any subsequent changes I push to my GitHub repository.

 

For example, let's say I upload an image banner to Dawn and pull the change to my local environment. Then, locally, I add a CSS rule to change the color of the header. If I commit this change and push it to the repository, then preview the theme, it won't show the change I made to the header. Incidentally, if I then go into the Shopify code editor and look at the theme files, my changes will appear. So clearly the changes are getting pushed, but for some reason the theme previewer won't reflect them. 

 

This has happened every time I've attempted to push a theme change after changing something from the admin panel or customizer. So far, the only solution I've found has been to delete the theme or disconnect it from GitHub, and then re-add it to my theme library, at which point I can hit preview and see the most recent version of the theme. This can't possibly be the only solution. I asked a friend who is a Shopify expert and she basically told me that Shopify is known for having cache issues. Should I just not make any local changes unless I'm sure I don't need to change anything else remotely?

Replies 2 (2)

Jamie_StackUp
Shopify Partner
10 0 0

Hey @Xavier_Haddon,

 

We started experiencing this issue on one of our stores today and our developer could only see changes by following the same steps that you took.

 

It does seem to be related to caching, and for whatever reason, the cache isn't getting cleared when changes are made to the theme. I've found that if you run the theme in an incognito/private window, then you will be able to observe changes made on your preview theme, and similarly, if you push those changes to your branch then they should be visible too.

 

 

If this doesn't work, then I think the issue might be tied to Shopify's CDN with resources not getting updated. It is an annoying issue like and we've not experienced it on any of our other stores since 2.0 launched so it could be a bug on Shopify's end.

 

Hope this helps! 

SminervaGerber
Visitor
1 0 1

We are having similar issues with our Preview, but we still have the same issue when we put the preview in incognito. This is happening across browsers, users and devices.