New schema is incompatible with the current setting value.

セクションのschemaを変更したら次のようなエラーが出た。

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

エラーは

新しいスキーマは、現在の設定値と互換性がありません。 ‘cols’の設定は文字列である必要があります。新しいスキーマは現在の設定値と互換性がありません。

と言う内容のエラーでした。

目次

解決方法はidを変更すること

schemaのidを変更したら解決しました。

以下のschemaのid

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

以下のschemaのidに変更しました。

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

原因はvalueの方が変わったから

schemaのtyperangeからselectに変更した時に、valueの型も変えてしまったことが原因でした。

valueの型がintからstringになっています。

変更前のschema

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

変更後の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をコピーしました!
  • URLをコピーしました!

コメント

コメントする


The reCAPTCHA verification period has expired. Please reload the page.

目次