Liquid, JavaScript, themes, sales channels
I am trying to develop the whole site locally first with all the data. When I will be DONE, I will push it to live.
But everyday when I am starting the project using CLI command "shopify theme dev", I get to see that all my previous added data/content, is lost. Whereas the image files are still there in the media library. But none of the blocks retain their content in their respective fields.
How is all the data getting lost everyday? I am very much confused, is this a bug in Shopify? Please check the video link here to refer to my issue & help me out.
https://www.awesomescreenshot.com/video/22149841?key=68e18f91e66f383ff04878f2f44d7457
Before you run shopify theme dev you need to create a deleopment theme to pull your changes from the customizer using the shopify theme pull command and only then run shopify theme dev. Because when you save your changes in the customizer, your settings_data.json is not changed locally
Hello Maxdanko,
When I am developing locally using Shopify CLI then none of the data i have added during my work stays after push. All the data that i have added during development from local gets lost.
Thanks
Thank you for your reply. To solve this problem you should create a development theme in your store and upload your code there, then you need to open two shopify cli terminals in one run shopify theme dev --store [store-name.myshopify.com] --theme [your_theme id from store]. After making changes in customizer you need to run shopify theme pull --store [store-name.myshopify.com] --theme [your_theme id from store] to pull down the changes, and after re-running shopify theme dev ... your changes from the customizer will remain. The shopify theme dev command sends the changes you had in your code but does not take them out of the customizer
Hello Maxdanko,
In the live site when I am adding the content in the home-page, then those data are actually found in the file index.json, please check the screenshot below.
But when I am working locally using Shopify CLI with local frontend url then after adding the data from the customize theme editor link, those data are not found in the index.json file, please check the screenshot below.
The data in the index.json file are not getting generated when I am working locally using Shopify CLI. Can you please explain why?
Thanks
Because in your case cli creates a virtual development environment that is not related to the store, so the changes from the customizer will not be applied
User | RANK |
---|---|
38 | |
24 | |
13 | |
11 | |
8 |
Transform this holiday season into a shopping spree. Plus, learn how to effortlessly open ...
By Jasonh Dec 8, 2023Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023