Invalid preset "Lookbook Masonry"

Topic summary

A user encountered an error when trying to update a Shopify theme file for a “Lookbook Masonry” section. The error message states: “Invalid preset ‘Lookbook Masonry’: cannot include blocks in preset because there are no blocks defined.”

The Issue:

  • The schema configuration includes presets that reference blocks, but the blocks array appears empty or improperly defined
  • This causes a validation error preventing the file from being saved

Proposed Solution:
A support representative (SideNode) provided a corrected schema structure that:

  • Properly defines the blocks array with an “item” block type containing image and product settings
  • Includes preset configurations for “Lookbook Masonry - 2 Columns” and “Lookbook Masonry - 3 Columns”
  • Maintains all the original section settings (fullwidth, show_title, text fields, etc.)

The fix involves replacing the existing schema with the provided corrected version that properly structures the blocks definition before referencing them in presets.

Summarized with AI on November 19. AI used: claude-sonnet-4-5-20250929.

Unable to update the file

  • Invalid preset “Lookbook Masonry”: cannot include blocks in preset because there are no blocks defined.
    {%- assign item = section.settings -%}

{%- assign grid = 3 -%}
{%- capture info_image_size -%}
{%- case grid -%}
{%- when ‘2’ -%}{% if item.fullwidth %}1200x750px{% else %}800x500px{% endif %}
{%- when ‘3’ -%}{% if item.fullwidth %}800x750px{% else %}400x500px{% endif %}
{%- else -%}{% if item.fullwidth %}650x750px{% else %}300x500px{% endif %}
{%- endcase -%}
{%- endcapture -%}

{%- assign img_size = info_image_size | split: ‘x’ | first | append: ‘x’ -%}

{% if item.show_title %}

{{ item.text1 }}

{% unless item.text2 == '' %}
{{ item.text2 }}
{% endunless %} {% unless item.default_carousel -%} {%- unless item.text3 == '' %}

{{ item.text3 }}

{% endunless -%} {%- endunless %}
{% endif %} {%- if section.blocks.size > 0 -%}
{%- for block in section.blocks -%} {%- assign b_i = block.settings -%}
{%- if b_i.image == blank -%} {% include 'get_svg', type: 'image', size: info_image_size %} {%- else -%} {{ b_i.image.alt }} {%- endif -%}

{%- for i in (1..5) -%}
{%- assign topi = ‘positiontop_’ | append: i -%}
{%- assign topi = b_i[topi] -%}
{%- assign topl = ‘positionleft_’ | append: i -%}
{%- assign topl = b_i[topl] -%}
{%- assign pri = ‘product_’ | append: i -%}
{%- assign pri = b_i[pri] -%}
{%- unless pri == blank -%}

{% comment %}Content in the file product.getproductlookbook.liquid{% endcomment %}
{%- endunless -%} {%- endfor -%}
{%- endfor -%}
{%- else -%} This section doesn’t currently include any content. Add content to this section using the sidebar. {%- endif -%}

{% schema %}
{
“name”: “Lookbook Masonry”,
“class”: “index-section”,
“settings”: [
{
“type”: “select”,
“id”: “top_offset”,
“label”: “Top Offset”,
“default”: “normal”,
“options”: [
{
“value”: “none”,
“label”: “None”
},
{
“value”: “small”,
“label”: “Small”
},
{
“value”: “normal”,
“label”: “Normal”
}
]
},
{
“type”: “checkbox”,
“id”: “fullwidth”,
“label”: “Fullwidth size”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “show_title”,
“label”: “Show Title Block”,
“default”: true
},
{
“type”: “textarea”,
“id”: “text1”,
“label”: “Title”,
“default”: “OUR COLLECTIONS”
},
{
“type”: “textarea”,
“id”: “text2”,
“label”: “Small description”,
“default”: “SUMMER 2018”,
“info”: “If you want delete text from the screen clear field”
},
{
“type”: “textarea”,
“id”: “text3”,
“label”: “Big description”,
“info”: “If you want delete text from the screen clear field. Field not work with slider mode”
}
],
“blocks”: [
{
“type”: “item”,
“name”: “Image”,
“settings”: [
{
“type”: “image_picker”,
“id”: “image”,
“label”: “Image”
},
{
“type”: “header”,
“content”: “Product 1”
},
{
“type”: “text”,
“id”: “positiontop_1”,
“label”: “Position top”,
“default”: “9”,
“info”: “In percent”
},
{
“type”: “textarea”,
“id”: “positionleft_1”,
“label”: “Position left”,
“default”: “63”,
“info”: “In percent”
},
{
“type”: “product”,
“id”: “product_1”,
“label”: “Select product”
},
{
“type”: “header”,
“content”: “Product 2”
},
{
“type”: “text”,
“id”: “positiontop_2”,
“label”: “Position top”,
“default”: “26”,
“info”: “In percent”
},
{
“type”: “textarea”,
“id”: “positionleft_2”,
“label”: “Position left”,
“default”: “50”,
“info”: “In percent”
},
{
“type”: “product”,
“id”: “product_2”,
“label”: “Select product”
},
{
“type”: “header”,
“content”: “Product 3”
},
{
“type”: “text”,
“id”: “positiontop_3”,
“label”: “Position top”,
“default”: “61”,
“info”: “In percent”
},
{
“type”: “textarea”,
“id”: “positionleft_3”,
“label”: “Position left”,
“default”: “48”,
“info”: “In percent”
},
{
“type”: “product”,
“id”: “product_3”,
“label”: “Select product”
},
{
“type”: “header”,
“content”: “Product 4”
},
{
“type”: “text”,
“id”: “positiontop_4”,
“label”: “Position top”,
“default”: “0”,
“info”: “In percent”
},
{
“type”: “textarea”,
“id”: “positionleft_4”,
“label”: “Position left”,
“default”: “0”,
“info”: “In percent”
},
{
“type”: “product”,
“id”: “product_4”,
“label”: “Select product”
},
{
“type”: “header”,
“content”: “Product 5”
},
{
“type”: “text”,
“id”: “positiontop_5”,
“label”: “Position top”,
“default”: “20”,
“info”: “In percent”
},
{
“type”: “textarea”,
“id”: “positionleft_5”,
“label”: “Position left”,
“default”: “0”,
“info”: “In percent”
},
{
“type”: “product”,
“id”: “product_5”,
“label”: “Select product”
}
]
}
],
“presets”: [
{
“name”: “Lookbook Masonry”,
“category”: “Lookbook”,
“blocks”: [
{
“type”: “item”
},
{
“type”: “item”
},
{
“type”: “item”
}
]
}
]
}
{% endschema %}

Hi @bd_dekmeepoom
Its SideNode! We will be happy to help you today.

You can try this code: it will be helpful to you

update your schema with provided schema .

{% schema %}
{
  "name": "Lookbook Masonry",
  "class": "index-section",
  "settings": [
    {
      "type": "select",
      "id": "top_offset",
      "label": "Top Offset",
      "default": "none",
      "options": [
        {
          "value": "none",
          "label": "None"
        },
        {
          "value": "small",
          "label": "Small"
        }
      ]
    },
    {
      "type": "checkbox",
      "id": "fullwidth",
      "label": "Fullwidth size",
      "default": true
    },
    {
      "type": "checkbox",
      "id": "show_title",
      "label": "Show Title Block",
      "default": true
    },
    {
      "type": "textarea",
      "id": "text1",
      "label": "Title",
      "default": "OUR COLLECTIONS"
    },
    {
      "type": "textarea",
      "id": "text2",
      "label": "Small description",
      "default": "SUMMER 2018",
      "info": "If you want to delete text from the screen, clear the field"
    },
    {
      "type": "textarea",
      "id": "text3",
      "label": "Big description",
      "info": "If you want to delete text from the screen, clear the field. This field does not work with slider mode."
    }
  ],
  "blocks": [
    {
      "type": "item",
      "name": "Image",
      "settings": [
        {
          "type": "image_picker",
          "id": "image",
          "label": "Image"
        },
        {
          "type": "header",
          "content": "Product 1"
        },
        {
          "type": "text",
          "id": "positiontop_1",
          "label": "Position top",
          "default": "9",
          "info": "In percent"
        },
        {
          "type": "textarea",
          "id": "positionleft_1",
          "label": "Position left",
          "default": "63",
          "info": "In percent"
        },
        {
          "type": "product",
          "id": "product_1",
          "label": "Select product"
        }
      ]
    }
  ],
  "presets": [
    {
      "name": "Lookbook Masonry - 2 Columns",
      "category": "Lookbook Masonry",
      "settings": {
        "fullwidth": false
      }
    },
    {
      "name": "Lookbook Masonry - 3 Columns",
      "category": "Lookbook Masonry",
      "settings": {
        "fullwidth": false
      }
    }
  ]

}
{% endschema %}

If I was able to assist you, please remember to give it a Like and Mark it as the Solution!
Let me know if need further assistance
Regards,
SideNode