如何从 Shopify 架构中删除块部分
How to remove blocks section from Shopify schema
如何从 shopify 模式代码中删除块部分?我只是想删除它,但由于一个奇怪的错误而无法保存。请看下面的代码:
{% schema %}
{
"name": "Featured Collection",
"settings": [
{
"type": "collection",
"id": "featured_collection",
"label": "Collection"
},
{
"type": "text",
"id": "collection_button_label",
"label": "Button Label",
"default": "Learn More"
}
],
"blocks": [
{
"type": "section",
"name": "Section",
"settings": [
]
}
],
"presets": [
{
"name": "Featured Collection",
"category": "Product"
}
]
}
{% endschema %}
我可以毫无错误地保存上面的代码。但是当我删除 "blocks" 的代码部分时,出现以下错误:
Error: New schema is incompatible with the current setting value. Invalid type value for block '1577470637989'. Type must be defined in schema.New schema is incompatible with the current setting value. Invalid type value for block '1577470668608'. Type must be defined in schema
错误是不言自明的。错误信息
Error: New schema is incompatible with the current setting value.
Invalid type value for block '1577470637989'. Type must be defined in
schema.New schema is incompatible with the current setting value.
Invalid type value for block '1577470668608'. Type must be defined in
schema
它指出您尝试保存的新架构与您拥有的现有数据不兼容。 Shopify 不知道如何处理您要删除的那些类型的现有块。
因此,只需先从 Shopify Customizer 中删除这些块,然后再编辑架构。
如何从 shopify 模式代码中删除块部分?我只是想删除它,但由于一个奇怪的错误而无法保存。请看下面的代码:
{% schema %}
{
"name": "Featured Collection",
"settings": [
{
"type": "collection",
"id": "featured_collection",
"label": "Collection"
},
{
"type": "text",
"id": "collection_button_label",
"label": "Button Label",
"default": "Learn More"
}
],
"blocks": [
{
"type": "section",
"name": "Section",
"settings": [
]
}
],
"presets": [
{
"name": "Featured Collection",
"category": "Product"
}
]
}
{% endschema %}
我可以毫无错误地保存上面的代码。但是当我删除 "blocks" 的代码部分时,出现以下错误:
Error: New schema is incompatible with the current setting value. Invalid type value for block '1577470637989'. Type must be defined in schema.New schema is incompatible with the current setting value. Invalid type value for block '1577470668608'. Type must be defined in schema
错误是不言自明的。错误信息
Error: New schema is incompatible with the current setting value. Invalid type value for block '1577470637989'. Type must be defined in schema.New schema is incompatible with the current setting value. Invalid type value for block '1577470668608'. Type must be defined in schema
它指出您尝试保存的新架构与您拥有的现有数据不兼容。 Shopify 不知道如何处理您要删除的那些类型的现有块。
因此,只需先从 Shopify Customizer 中删除这些块,然后再编辑架构。