Short description of issue
FileSaveError: sections: can’t be blank when creating new templates in the online code editor
Link to Shopify Store
vivolife.myshopify.com
Reproduction steps
Open code editor on a theme
Navigate to templates
Open a known-working json template or create a blank one.
Ctrl + Shft + A (Save As)
Change filename and press save
Error appears.
Additional info
Related Feature Request:
My marketing and development teams would like a simpler separate admin area within Shopify themes to rename, create, and delete product/page/collection templates.
The marketing team want to create and locate templates more quickly for A/B testing and updates with less risk of typos and simpler staff onboarding.
The development team want to keep the marketing team out of the code.
What type of topic is this
Bug report
The error is self explanatory, you can’t save a json template file without the sections property, take this minimal JSON and paste it inside the files before saving:
/*
* ------------------------------------------------------------
* IMPORTANT: The contents of this file are auto-generated.
*
* This file may be updated by the Shopify admin theme editor
* or related systems. Please exercise caution as any changes
* made to this file may be overwritten.
* ------------------------------------------------------------
*/
{
"sections": {
"dummy": {
"type": "dummy",
"settings": {}
}
},
"order": ["dummy"]
}
Replace dummy with the section you need / a default section.
Thanks, I was unable to do this for the last couple of days. I couldn’t even use save As on my own working files as new json templates. Now I seem to be able to.
1 Like