FROM CACHE - en_header

Update to .json template file removes content from sections within that template

ALoppnow
New Member
2 0 1

I'm using theme watch to push local file edits to Shopify on file save. I'm working on a theme that is not live if that matters. 

This is a repeatable thing so either I do not understand the idea of the theme set up or this is a bug.

I created a json template file, this file includes sections, those sections have editable areas defined by schema data (text, rich text, images). I have a page with this template and add content to those sections via the Theme customizer. 

Now I edit the template file locally (adding a new section), theme watch does its magic to bring it to Shopify and then all my content for this page is gone. All sections are empty.

Is this expected behavior ? 

shop-lp.json file : 

{
	"name": "Shop Landing Page Template",
	"sections": {
		"headline":{
			"type":"headline"
		},
		"top-collections":{
			"type":"top-collections"
		},
		"popular-collections":{
			"type":"popular-collections"
		},
		"top-sellers":{
			"type":"top-sellers"
		},
		"curated-reviews":{
			"type":"curated-reviews"
		},
		"content-columns":{
			"type":"content-columns"
		},
		"gift-card-links":{
			"type":"card-links"
		},
		"blue-content-box-one":{
			"type":"bluecontentbox"
		},
		"blue-content-box-two":{
			"type":"bluecontentbox"
		}
	},
	"order": [
		"headline",
		"top-collections",
		"popular-collections",
		"top-sellers",
		"curated-reviews",
		"content-columns",
		"gift-card-links",
		"blue-content-box-one",
		"blue-content-box-two"
	]
}

 

Reply 1 (1)
ALoppnow
New Member
2 0 1

Just to update this thread, it is kind of expected behavior although not helpful for local development. 

 

Editing a template via theme customizer edits the json file itself adding data (filename for images for example) of the customization. 

 

So to effectively use local development do a theme pull every time before editing files locally.