Is there any known file size limit for the `settings_data.json` file. I think that I saw somewhere that it's 1.5MB, but I can't find that info now.
I have a situation that I managed to save one pretty large file (~ 2.1MB), but now I don't see that data in the Customizer.
I found why I didn't see the data in the customzier - it was my fault.
If anyone interested - I have a `settings_data.json` of 2.5MB and it works (it can be saved). However, I have problems to open it in the Shopify editor, probably because of the size.
How did you get a file larger than 1.5MB. This limit for such a file seems ridiculous. I have been searching and this is the only result I found where someone is talking about the limit. I am no longer able to save my file in the GUI or ThemeKit. I get the following error.
> 10:39:45 [development] processing config/settings_data.json
> [development] (config/settings_data.json) Theme configuration exceeds 1.5 MB limit. Delete a section or reduce text content in order to save.
At the time I wrote my question the Customizer and that part of the Shopify platform worked a bit different (at least the loading of the Customizer worked differently, so big file was the issue). At that time they loaded the whole JSON file into Customizer and then they rendered the interface of the Customizer. After that they improved the rendering flow and I was able to load the Customizer faster. So, file size affected the Customizer loading and speed.
However, that file was huuge and with a lot of data and I managed to get that size by having too many sections. If I had native metafields then, I might not need to use Customizer for my custom logic.
2-3 months after I wrote this Shopify made some changes to their platform and introduced some additional limitations (e.g. max number of repeatable items in the sections, they added native support for metafields, etc.). So, we changed the logic that abused the Customizer and switched to a custom app.
Anyway, I'm not sure about the limit now but if you reached the limit, maybe you should rethink some of your implementations to reduce the number of sections (in case you can store data for you entity into metafields and not in the Customzier)?
I agree. Adding this data to the product with meta fields would be a more streamlined approach. I did not write this custom code that makes me put this data in the setting_data.json file. Either way thank you for your replay. I'll have to try and rewrite this code. So it pulls the data from the meta-fields.
Shopify if there is a way to open this limitation that would a way cooler. Or, maybe let us know why the file needs to be 1.5MB.
Make the shift from discounts to donations, and witness your business not only thrive fina...By Holly Dec 4, 2023
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...By Arno Nov 27, 2023