Resolve error: “Template content exceeds 256KB limit”?
When saving or publishing your page, you may see a message “Template content exceeds 256KB limit” like the below image.
While EComposer is super flexible, we still need to abide by Shopify’s rules regarding themes and templates to make sure it is not affecting your site performance. One of those requirements is that template files in themes are less than 256KB in size. When building a page you might exceed that limit in a few ways. But in general, it is probably because there are too many elements on the page or you are using big chunks of code in custom code blocks.
1. Your page has too many sections
One of the reasons is that your page content contains too many elements on it. Each of our elements will be made up of a certain amount of HTML code. Normally, you should add about 10-12 sections to a page. To check the number of sections, you can open the Navigator tab.
For example, on the above page, I have 9 sections. To solve the issue, you can try to check to delete the sections if you see if they are duplicated. When you insert a template to your page, you might tick the Insert under current layout in the editor option (see the below image). If you tick that options, the sections in the new template will be inserted below the existing sections on your page. So the number of sections can increase a lot without you knowing.
2. Your page has so many Product grid or Product box elements
For example, you added so many Product grid or Product box elements on your page, and this section contains so much HTML code. You should use 2 to 3 Product grid elements on a page only. To solve the issue, please try to remove them one by one until you can save the page successfully.
3. The issue is with the upload icons on your page
Another reason you can check is with the uploaded icons on your page. If you are using the uploaded icons, there might have so much HTML code in each icon as you can see in the below example. To solve the issue, you can convert the icons to images to use, or you can use this tool to resize the icons and then upload them to the app again to use.
4. Some other reasons
Also, when you copy content from somewhere else and paste it into our app, you accidentally copy the HTML code of that content. The way to solve this problem is when pasting content, please use the key combination ⌘ + shift + v to paste text only instead of using ⌘ + v
If you can not solve it yourself, don’t hesitate to get in touch with us via live chat, and we will help you check and solve the problem.