没有不值得去解决的问题,也没有不值得去学习的技术!

Shopify GitHub Theme Sync Fails: Validation Error in config/settings_schema.json

When syncing a theme from GitHub in Shopify, an error occurred: config/settings_schema.json, Validation failed

1. When syncing a theme from GitHub in Shopify, an error occurred: config/settings_schema.json, Validation failed. See Figure 1.

When syncing a theme from GitHub in Shopify, an error occurred: config/settings_schema.json, Validation failed
Figure 1
Plaintext
01:57:46:

Template files received from GitHub

01:57:46:

Files retrieved

01:57:46:

Error: config/settings_schema.json, Validation failed: Section 1: settings is required, Section 1: 'theme_name' is not a valid attribute, Section 1: 'theme_version' is not a valid attribute, Section 1: 'theme_author' is not a valid attribute, Section 1: 'theme_documentation_url' is not a valid attribute, Section 1: 'theme_support_url' is not a valid attribute

01:57:46:

0 succeeded, 0 warnings, 1 failed

01:57:46:

Template updated!

2. The original Dawn configuration is as follows:

JSON

  {
    "name": "theme_info",
    "theme_name": "Dawn",
    "theme_version": "7.0.1",
    "theme_author": "Shopify",
    "theme_documentation_url": "https://help.shopify.com/manual/online-store/themes",
    "theme_support_url": "https://support.shopify.com/"
  }

3. The configuration after editing that caused the error is as follows:

JSON

  {
    "name": "dark",
    "theme_name": "Dark",
    "theme_version": "0.0.1",
    "theme_author": "Qiang Wang",
    "theme_documentation_url": "https://www.shuijingwanwq.com/",
    "theme_support_url": "https://www.shuijingwanwq.com/"
  }

4. Reference: https://shopify.dev/themes/getting-started/create#step-7-test-your-connection . Update the theme_name value to match the name you specified for the template using Shopify CLI. Change it to: dawn-20221011.

JSON

  {
    "name": "theme_info",
    "theme_name": "dawn-20221011",
    "theme_version": "0.0.1",
    "theme_author": "Qiang Wang",
    "theme_documentation_url": "https://help.shopify.com/manual/online-store/themes",
    "theme_support_url": "https://www.shuijingwanwq.com/"
  }

5. Git commit and push succeeded. See Figure 2.

Git commit and push succeeded
Figure 2

6. Click Customize to open the theme editor. Next to the repository and branch names, click the menu button ⋯. In the menu, the theme name should match the value you entered in settings_schema.json. Its value is: dawn-20221011 0.0.1 Designed and supported by Qiang Wang. See Figure 3.

Click Customize to open the theme editor. Next to the repository and branch names, click the menu button ⋯. In the menu, the theme name should match the value you entered in settings_schema.json. Its value is: dawn-20221011 0.0.1 Designed and supported by Qiang Wang
Figure 3

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系