【问题标题】:An error prevented faq.liquid from being saved一个错误导致 faq.liquid 无法保存
【发布时间】:2017-10-31 19:02:17
【问题描述】:

我正在尝试向 Shopify 主题添加带有块的常见问题解答部分。我可以动态添加没有块的部分,但是一旦我尝试添加块,我就会不断收到错误消息

一个错误导致 faq.liquid 无法保存。

我不确定到底是什么问题或为什么它不起作用,因为这是一个非常模糊的错误消息。

这是我的代码:

<hr>
 <div id="section-faq">
  <div class="section-header text-center">
 <h3> {{ section.settings.text-box }} </h3>
</div>

{% for block in section.blocks %}  
<div class="btn" id="faq">   
  <a href="{{ block.settings.text-box }}" class="btn">{{ block.settings.text 
  }}</a>
</div> 
 {% endfor %}

</div>  
<hr>


{% schema %}
{
"name": "faq",
"max_blocks": 6,
"settings": [
    {
    "id": "text-box",
    "type": "text",
    "label": "Heading",
    "default": "FAQ"
  }
],
"blocks": [
    {
    "type": "QA",
    "name": "QA",
    "settings": [
        {
        "id": "text-box",
        "type": "text",
        "label": "Question",
        "default": "Add Question"
      },
      {
        "id": "text",
        "type": "richtext",
        "label": "Answer",
        "default": "<p>Add your answer here</p>"
      }
    ]
    }
],
"presets": [
    {
      "name": "FAQ",
      "category": "Faq"
    }
]
}
{% endschema %}

【问题讨论】:

    标签: json error-handling shopify liquid


    【解决方案1】:

    我已经检查并创建了新部分,并添加了您的代码,它对我来说工作正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-01-03
      • 1970-01-01
      • 2019-02-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-16
      • 1970-01-01
      相关资源
      最近更新 更多