JSON Template update deletes section saved data

Solved

JSON Template update deletes section saved data

PavelEpave
Shopify Partner
2 1 0

Hi,

 

I use JSON templating and every time I update for example index.json, adding a section or modifying the order of the section, all the data that I had on the online store saved for this template is reset.

 

Technically it means I lose all my home page data every time I update index.json, and I have to go to the dashboard and redo all the selection manually.

 

Is it normal behaviour ? Because it means that this website cannot go to production like this : any change to the templating would reset all the website's data...

Accepted Solution (1)

PavelEpave
Shopify Partner
2 1 0

This is an accepted solution.

When updating you JSON template in the dashboard, it saves the data and updates you JSON data. So when you push from local files you erase those changes : I stoped losing my work when I linked my repository and pulled before making any changes.

View solution in original post

Replies 4 (4)

shellbryson
Shopify Partner
45 2 16

This just became an enormous issue for me too, for a site we're launching TOMORROW. Nightmare. We're deploying dozens of times tonight as we get a site ready to roll, and every time, the data is reset.

justinhandley
New Member
8 0 0

I'm also running into this and am looking for answers - did you ever figure out if there is a way around this?

PavelEpave
Shopify Partner
2 1 0

This is an accepted solution.

When updating you JSON template in the dashboard, it saves the data and updates you JSON data. So when you push from local files you erase those changes : I stoped losing my work when I linked my repository and pulled before making any changes.

shellbryson
Shopify Partner
45 2 16

We changed our deploys so that, by default, the JSON files are ignored. We pull/push, too, if we need to change the JSON templates, but these files rarely need to be touched in day-to-day development. We use the Shopify CLI in our tooling, and it's easy enough to set up exceptions.