Shopify / dawn

Shopify's first source available reference theme, with Online Store 2.0 features and performance built-in.
Other
2.53k stars 3.41k forks source link

Shopify CLI Theme Check fails on sections/email-signup-banner.liquid with ValidSchema error #3621

Closed jbrrrrr-abds closed 1 month ago

jbrrrrr-abds commented 1 month ago

Describe the current behavior

Shopify CLI 'theme check' fails with 1 error when using the latest Dawn theme update.

Error:

─ info ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                                                                      │
│  sections/email-signup-banner.liquid                                                                                                 │
│                                                                                                                                      │
│                                                                                                                                      │
│  [error]: ValidSchema                                                                                                                │
│  Property templates is not allowed.                                                                                                  │
│                                                                                                                                      │
│  402  "templates": ["password"]

Describe the expected behavior

Shopify CLI 'theme check' should pass with no errors.

Version information (Dawn, browsers and operating systems)

Possible solution

Error is related to line 402 of sections/email-signup-banner.liquid. Seems like this may either be an issue with this Liquid section file, or something may have changed with Shopify CLI related to ValidSchema. If this is actually valid Liquid, and is a Shopify CLI issue, can you please pass this along to the appropriate team with verification that it should not be throwing an error? Opening here first because it's either one or the other and I can't find any documentation about this "template" property being valid or not.

Additional context/screenshots

jbrrrrr-abds commented 1 month ago

Looks like the "templates" line needs to be updated to "enabled_on", like this: "enabled_on": { "templates": ["password"] }

Source: "enabled_on, along with disabled_on, replaces the templates attribute."