New schema is incompatible with the current setting value.

shopify
スポンサーリンク
language

When I changed the schema of the section, I got the following error.

New schema is incompatible with the current setting value. Setting 'cols' must be a string.New schema is incompatible with the current setting value.

This error means The new schema is incompatible with the current configuration values. The ‘cols’ setting must be a string. The new schema is incompatible with the current configuration values. The new schema is not compatible with the current settings.

スポンサーリンク

The solution is to change the ID.

I changed the schema ID and that solved the problem.

Set the following schema ID

{
  "type": "range",
  "id": "cols",
  ...
}

to changed to the following schema ID.

{
  "type": "select",
  "id": "columns",
  ...
}

The reason is that the value has changed.

The reason was that when I changed the schema type from range to select, I also changed the value type.

The type of value has been changed from int to string.

schema before the change.

{
  "type": "range",
  "id": "cols",
  "label": "Medium device columns",
  "min": 1,
  "max": 12,
  "step": 1,
  "default": 2,
  "info": "Minimum width 768px"
}

Changed schema.

{
  "type": "select",
  "id": "columns",
  "label": "Medium device columns",
  "info": "Minimum width 768px",
  "default": "grid-cols-2",
  "options": [
    {
      "value": "grid-cols-1",
      "label": "1 Column"
    },
    {
      "value": "grid-cols-2",
      "label": "2 Columns"
    },
    {
      "value": "grid-cols-3",
      "label": "3 Columns"
    },
    {
      "value": "grid-cols-4",
      "label": "4 Columns"
    },
    {
      "value": "grid-cols-5",
      "label": "5 Columns"
    }
  ]
}

タイトルとURLをコピーしました