CLI Theme editor changes not working

no_robotocha
Shopify Partner
42 2 6

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 4 (4)

no_robotocha
Shopify Partner
42 2 6

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
42 2 6

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
42 2 6

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
13 0 5

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