Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

CLI Theme editor changes not working

CLI Theme editor changes not working

no_robotocha
Shopify Partner
56 2 18

I have used the CLI for some time and don't think I'm doing anything incorrectly:

 

  • I'm previewing my theme to look at a new section I've developed
  • In the preview customizer (accessed via the CLI) I've added the new section and content, all visible in the customizer
  • The preview of the theme is not showing this section. I tried changing something simple in a different section - a title - this change doesn't show either
  • I check the template (index.json) and the new section and the change I made are visible there
  • The section was visible when I was working on it last week, but now not when viewed locally. When viewing the version which I've pushed to the Online Store, the section appears
  • I've tried restarting, rebooting, changing the port, making changes to liquid to ensure the CLI is syncing these changes (it is)

It's as if the templates are showing a cached version - can anyone help?

--
No, Robotocha!
Replies 7 (7)

no_robotocha
Shopify Partner
56 2 18

I've just done another test, using a different store, different theme - and changes I make in the Customizer for this one also do not change.

 

Update: Even changes made when modifying a liquid file don't show up in the locally served theme, so my issue is not exclusive to Customizer changes.

 

For instance, if I add a h1 element directly into the theme.liquid before the existing content, nothing gets added despite the sync update in the CLI. When I delete the entire theme.liquid content, it throws the error and un-deleting syncs properly - but none of this, or editing in Customizer, affects the theme preview in any way.

 

Screenshot 2024-03-21 at 13.49.32.png

--
No, Robotocha!

no_robotocha
Shopify Partner
56 2 18

I've had a few hiccups but seem to have a solution:

 

  • Update Shopify CLI to latest
  • Git checkout to another branch (should now be editable)
  • Git checkout to the required branch

I'm not sure what was causing this but I needed to follow all steps for each distinct store. And when I swapped back to the first store I did this with, I had to do the git checkouts again to make it editable again..

--
No, Robotocha!
no_robotocha
Shopify Partner
56 2 18

From reading other people's posts of a similar issue, I believe it might have something to do with an error in json settings. While the solution above can be helpful, the issue returns - but this seems resolved in other branches.

--
No, Robotocha!
nhcon
Shopify Partner
14 0 7

Did you find out what the json settings error was by any chance?  I'm having this same issue.

no_robotocha
Shopify Partner
56 2 18

Out of interest, do you use the CLI with different stores / accounts?

--
No, Robotocha!
Marianna_YTTG
Shopify Partner
48 0 3

Did you find any solution / reported this to the Shopify team?

I'm experiencing a lot of weirdness with the CLI lately... really frustrating

But I am not using the github integration so far

thekwoka
Shopify Partner
12 1 4

I'm having this same issue now.

Even stranger is that if I do a new theme dev, the very first load will be correct. And then afterwards it goes back to showing the live theme.

It worked a few times initially and then stopped updating, and even reverting a bunch of code it still doesn't come back