I have reproduced the issue on the latest CLI version.
Yes, I am on the latest version
I have searched existing posts and this report is not a duplicate.
Yes, this isn’t a duplicate
In which of these areas are you experiencing a problem?
Theme
Expected behavior
Templates and their changes should persist during development.
Actual behavior
This started happening today. Recently added JSON (and presumably Liquid too) templates do not persist on the products that have them assigned.
Overall, it seems like something is getting stuck in cache somewhere, or something to that nature. I have tried CLI versions 4.2.0, 4.0.0 and 3.87.4 - all exhibit this problem, so have to assume its server-side.
Reproduction steps
Trigger is unknown, but for example:
- I have Product A assigned to ‘product.no-buy-button’
- I create a template called ‘product.no-buy-button’
- Hot-reload reloads the page, I see the template
- I reload the same page via browser controls, and the template that is rendered is now the default product template
- I make a change to the JSON in the ‘no-buy-button’ template, hot-reload shows the changes
- I make a change to a section’s HTML that the JSON template uses, and the page reloads to show the product using the default product template again
Verbose output
N/A
Operating system
macOS 15.7.7
CLI version
4.2.0