"Select" block attribute invalid

Asked by At

I've been enjoying learning Liquid using YouTube videos by Shopify developers and staff, but I've run into a rather bizarre hitch. It is my understanding that Block types are arbitrary text strings that I determine. The YouTube video I'm following using the type "select" to create multiple blocks with a callout in the presets section. However, the debugger rejects this term as an "invalid ID."

My schema is below:

{% schema %}
{
  "name": "Footer Section",
  "max_blocks": 3,
  "settings": [
    {
        "id": "footer-section-title",
        "type": "text",
        "label": "Footer Title",
        "default": "Footer"
    }
  ],
  "blocks": [
    {
      "type": "select",
      "name": "select",
      "settings:": [
        {
          "id": "footer-linktext",
          "type": "text",
          "label": "Link Text",
          "default": "Click Here"
        },
        {
          "id": "footer-linkurl",
          "type": "url",
          "label": "Link URL",
          "default": "Click Here"
        }
      ]
    }
  ],
  "presets": [
    {
      "name": "Footer Blocks",
      "category": "Footer",
        "blocks": [
            {
                "type": "select"
            },
        {
                "type": "select"
            }
        ]
    }
  ]
}
{% endschema %}

This is nearly identical to the one that appears to work in the video in 2017. Have things changed? I've tried other terms, but all are rejected.

Thank you in advance!

1 Answers

0
drip On Best Solutions

Your "settings:": [ have additional : in the string. That's what is throwing errors.

Change it to only "settings" and you shouldn't have problems.