Theme sections require multiple blocks in order to add an "@app" block

Theme sections seem to require multiple types of blocks that are not a “@app” before it will allow you to add an app block.

For instance, this following code will only display an “Add image” option for a section. It will not allow you to add an app block to the section. Examples below.

NOTE:

  • We are seeing this with the Dawn theme
  • This behavior seems like a bug

  {%- for block in section.blocks -%}
    {% render block %}
  {%- endfor -%}

{% schema %}
  {
    "name": "MY SECTION",
    "blocks": [
      {
        "type": "@app"
      },
      {
        "name": "Image",
        "type": "image"
      }
    ],
    "presets": [
      {
      "name": "MY SECTION"
      }
    ]
  }
{% endschema %}

The only way I’m able to provide the ability to add an app block is if I provide multiple non-“@app” type blocks.


  {%- for block in section.blocks -%}
    {% render block %}
  {%- endfor -%}

{% schema %}
{
  "name": "MY SECTION",
  "blocks": [
    {
      "type": "@app"
    },
    {
      "name": "Image",
      "type": "image"
    },
    {
      "name": "IGNORE ME",
      "type": "IGNORE_ME"
    }
  ],
  "presets": [
    {
      "name": "MY SECTION"
    }
  ]
}
{% endschema %}

This behavior seems like a bug to me. Can someone from Shopify help or provide a way to report this?

2 Likes

Anybody else seeing this behavior? Does this seem like a bug to anybody else?

1 Like