Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme validation: Reintroduce missing variables #8173

Closed
wants to merge 3 commits into from

Conversation

vcanales
Copy link
Contributor

@vcanales vcanales commented Sep 17, 2024

Description

Running the theme validation script is failing in trunk, because of missing variables. This PR reintroduces these variables.

trunk:

➜  themes git:(trunk) node theme-utils.mjs validate-theme --format=json $(find . -name 'style.css' | awk -F/ '{print $2}' | uniq | sort | paste -s -d, -) | jq '.[].data[].message' | sort | uniq -c | sort -bgr

file:///Users/vcanales/dev/themes/theme-utils.mjs:1773
                if ( hasThemeJson && ! hasThemeJsonSupport ) {
                ^

ReferenceError: hasThemeJson is not defined
    at validateThemes (file:///Users/vcanales/dev/themes/theme-utils.mjs:1773:3)
    at async Object.run (file:///Users/vcanales/dev/themes/theme-utils.mjs:192:4)
    at async start (file:///Users/vcanales/dev/themes/theme-utils.mjs:210:2)

Node.js v20.14.0

Related issue(s):

Fix for #8068 (comment)

@vcanales vcanales added the [Type] Bug Something isn't working label Sep 17, 2024
@vcanales vcanales force-pushed the fix-theme-json-validation-workflow branch from 051fec5 to 718dfda Compare September 17, 2024 15:05
@vcanales
Copy link
Contributor Author

I tested running this on the Kiosko theme; it's running again, but I'm not sure if this is the expected output—seems like a lot of issues.

 themes git:(fix-theme-json-validation-workflow) node theme-utils.mjs validate-theme -- kiosko           


Progress: [ '■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■', 100 ] 1/1

╔══════════════════════════════════════════════════╤═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╗
║ WARNING                                          │ Actual   : 5.8                                                                                                                                        ║
║ Theme : Kiosko                                   │ Expected : 5.9 or greater                                                                                                                             ║
║ File  : style.css                                │ Message  : the 'Requires at least' version does not support theme.json                                                                                ║
╟──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ ERROR                                            │ Message : missing Theme Name header metadata                                                                                                          ║
║ Theme : Kiosko                                   │                                                                                                                                                       ║
║ File  : style.css                                │                                                                                                                                                       ║
╟──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ WARNING                                          │ Message : missing Theme URI header metadata                                                                                                           ║
║ Theme : Kiosko                                   │                                                                                                                                                       ║
║ File  : style.css                                │                                                                                                                                                       ║
╟──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ ERROR                                            │ Message : missing Author header metadata                                                                                                              ║
║ Theme : Kiosko                                   │                                                                                                                                                       ║
║ File  : style.css                                │                                                                                                                                                       ║
╟──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ WARNING                                          │ Message : missing Author URI header metadata                                                                                                          ║
║ Theme : Kiosko                                   │                                                                                                                                                       ║
║ File  : style.css                                │                                                                                                                                                       ║
╟──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ ERROR                                            │ Message : missing Description header metadata                                                                                                         ║
║ Theme : Kiosko                                   │                                                                                                                                                       ║
║ File  : style.css                                │                                                                                                                                                       ║
╟──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ ERROR                                            │ Message : missing Tested up to header metadata                                                                                                        ║
║ Theme : Kiosko                                   │                                                                                                                                                       ║
║ File  : style.css                                │                                                                                                                                                       ║
╟──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ ERROR                                            │ Message : missing Requires PHP header metadata                                                                                                        ║
║ Theme : Kiosko                                   │                                                                                                                                                       ║
║ File  : style.css                                │                                                                                                                                                       ║
╟──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ ERROR                                            │ Message : missing License header metadata                                                                                                             ║
║ Theme : Kiosko                                   │                                                                                                                                                       ║
║ File  : style.css                                │                                                                                                                                                       ║
╟──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ ERROR                                            │ Message : missing License URI header metadata                                                                                                         ║
║ Theme : Kiosko                                   │                                                                                                                                                       ║
║ File  : style.css                                │                                                                                                                                                       ║
╟──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ ERROR                                            │ Message : missing Text Domain header metadata                                                                                                         ║
║ Theme : Kiosko                                   │                                                                                                                                                       ║
║ File  : style.css                                │                                                                                                                                                       ║
╟──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ WARNING                                          │ Instance path : /version                                                                                                                              ║
║ Theme  : Kiosko                                  │ Schema path   : #/properties/version/const                                                                                                            ║
║ File   : theme.json                              │ Keyword       : const                                                                                                                                 ║
║ Schema : https://schemas.wp.org/trunk/theme.json │ Params        : { allowedValue: 3 }                                                                                                                   ║
║                                                  │ Message       : must be equal to constant                                                                                                             ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /settings/layout                                                                                                                      ║
║                                                  │ Schema path   : #/definitions/settingsLayoutProperties/properties/layout/additionalProperties                                                         ║
║                                                  │ Keyword       : additionalProperties                                                                                                                  ║
║                                                  │ Params        : { additionalProperty: 'definitions' }                                                                                                 ║
║                                                  │ Message       : must NOT have additional properties                                                                                                   ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/elements/button/spacing/padding                                                                                               ║
║                                                  │ Schema path   : #/properties/spacing/properties/padding/type                                                                                          ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-author-name/typography/lineHeight                                                                        ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf/0/type                                                                            ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'string' }                                                                                                                    ║
║                                                  │ Message       : must be string                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-author-name/typography/lineHeight                                                                        ║
║                                                  │ Schema path   : #/definitions/refComplete/type                                                                                                        ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-author-name/typography/lineHeight                                                                        ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf                                                                                   ║
║                                                  │ Keyword       : oneOf                                                                                                                                 ║
║                                                  │ Params        : { passingSchemas: null }                                                                                                              ║
║                                                  │ Message       : must match exactly one schema in oneOf                                                                                                ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-date/typography/lineHeight                                                                               ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf/0/type                                                                            ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'string' }                                                                                                                    ║
║                                                  │ Message       : must be string                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-date/typography/lineHeight                                                                               ║
║                                                  │ Schema path   : #/definitions/refComplete/type                                                                                                        ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-date/typography/lineHeight                                                                               ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf                                                                                   ║
║                                                  │ Keyword       : oneOf                                                                                                                                 ║
║                                                  │ Params        : { passingSchemas: null }                                                                                                              ║
║                                                  │ Message       : must match exactly one schema in oneOf                                                                                                ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-edit-link/typography/lineHeight                                                                          ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf/0/type                                                                            ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'string' }                                                                                                                    ║
║                                                  │ Message       : must be string                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-edit-link/typography/lineHeight                                                                          ║
║                                                  │ Schema path   : #/definitions/refComplete/type                                                                                                        ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-edit-link/typography/lineHeight                                                                          ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf                                                                                   ║
║                                                  │ Keyword       : oneOf                                                                                                                                 ║
║                                                  │ Params        : { passingSchemas: null }                                                                                                              ║
║                                                  │ Message       : must match exactly one schema in oneOf                                                                                                ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-reply-link/elements/link/spacing/padding                                                                 ║
║                                                  │ Schema path   : #/properties/spacing/properties/padding/type                                                                                          ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comments-pagination/typography/lineHeight                                                                        ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf/0/type                                                                            ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'string' }                                                                                                                    ║
║                                                  │ Message       : must be string                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comments-pagination/typography/lineHeight                                                                        ║
║                                                  │ Schema path   : #/definitions/refComplete/type                                                                                                        ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comments-pagination/typography/lineHeight                                                                        ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf                                                                                   ║
║                                                  │ Keyword       : oneOf                                                                                                                                 ║
║                                                  │ Params        : { passingSchemas: null }                                                                                                              ║
║                                                  │ Message       : must match exactly one schema in oneOf                                                                                                ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1post-title/typography/lineHeight                                                                                 ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf/0/type                                                                            ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'string' }                                                                                                                    ║
║                                                  │ Message       : must be string                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1post-title/typography/lineHeight                                                                                 ║
║                                                  │ Schema path   : #/definitions/refComplete/type                                                                                                        ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1post-title/typography/lineHeight                                                                                 ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf                                                                                   ║
║                                                  │ Keyword       : oneOf                                                                                                                                 ║
║                                                  │ Params        : { passingSchemas: null }                                                                                                              ║
║                                                  │ Message       : must match exactly one schema in oneOf                                                                                                ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-author-name/typography/lineHeight                                                                        ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf/0/type                                                                            ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'string' }                                                                                                                    ║
║                                                  │ Message       : must be string                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-author-name/typography/lineHeight                                                                        ║
║                                                  │ Schema path   : #/definitions/refComplete/type                                                                                                        ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-author-name/typography/lineHeight                                                                        ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf                                                                                   ║
║                                                  │ Keyword       : oneOf                                                                                                                                 ║
║                                                  │ Params        : { passingSchemas: null }                                                                                                              ║
║                                                  │ Message       : must match exactly one schema in oneOf                                                                                                ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-date/typography/lineHeight                                                                               ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf/0/type                                                                            ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'string' }                                                                                                                    ║
║                                                  │ Message       : must be string                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-date/typography/lineHeight                                                                               ║
║                                                  │ Schema path   : #/definitions/refComplete/type                                                                                                        ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-date/typography/lineHeight                                                                               ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf                                                                                   ║
║                                                  │ Keyword       : oneOf                                                                                                                                 ║
║                                                  │ Params        : { passingSchemas: null }                                                                                                              ║
║                                                  │ Message       : must match exactly one schema in oneOf                                                                                                ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-edit-link/typography/lineHeight                                                                          ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf/0/type                                                                            ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'string' }                                                                                                                    ║
║                                                  │ Message       : must be string                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-edit-link/typography/lineHeight                                                                          ║
║                                                  │ Schema path   : #/definitions/refComplete/type                                                                                                        ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-edit-link/typography/lineHeight                                                                          ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf                                                                                   ║
║                                                  │ Keyword       : oneOf                                                                                                                                 ║
║                                                  │ Params        : { passingSchemas: null }                                                                                                              ║
║                                                  │ Message       : must match exactly one schema in oneOf                                                                                                ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comment-reply-link/elements/link/spacing/padding                                                                 ║
║                                                  │ Schema path   : #/properties/spacing/properties/padding/type                                                                                          ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comments-pagination/typography/lineHeight                                                                        ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf/0/type                                                                            ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'string' }                                                                                                                    ║
║                                                  │ Message       : must be string                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comments-pagination/typography/lineHeight                                                                        ║
║                                                  │ Schema path   : #/definitions/refComplete/type                                                                                                        ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1comments-pagination/typography/lineHeight                                                                        ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf                                                                                   ║
║                                                  │ Keyword       : oneOf                                                                                                                                 ║
║                                                  │ Params        : { passingSchemas: null }                                                                                                              ║
║                                                  │ Message       : must match exactly one schema in oneOf                                                                                                ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1post-title/typography/lineHeight                                                                                 ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf/0/type                                                                            ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'string' }                                                                                                                    ║
║                                                  │ Message       : must be string                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1post-title/typography/lineHeight                                                                                 ║
║                                                  │ Schema path   : #/definitions/refComplete/type                                                                                                        ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/core~1post-title/typography/lineHeight                                                                                 ║
║                                                  │ Schema path   : #/properties/typography/properties/lineHeight/oneOf                                                                                   ║
║                                                  │ Keyword       : oneOf                                                                                                                                 ║
║                                                  │ Params        : { passingSchemas: null }                                                                                                              ║
║                                                  │ Message       : must match exactly one schema in oneOf                                                                                                ║
║                                                  ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║                                                  │ Instance path : /styles/blocks/woocommerce~1product-button/spacing/padding                                                                            ║
║                                                  │ Schema path   : #/properties/spacing/properties/padding/type                                                                                          ║
║                                                  │ Keyword       : type                                                                                                                                  ║
║                                                  │ Params        : { type: 'object' }                                                                                                                    ║
║                                                  │ Message       : must be object                                                                                                                        ║
╚══════════════════════════════════════════════════╧═══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════╝

Validation failed.

cc. @madhusudhand @ajlende

@vcanales
Copy link
Contributor Author

Looking at the theme files, it seems like it's detecting problems that are not actually there:

e.g. the missing Tested up to header that it thinks it's missing from Kiosko's style.css file:

╟──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢
║ ERROR                                            │ Message : missing Tested up to header metadata                                                                                                        ║
║ Theme : Kiosko                                   │                                                                                                                                                       ║
║ File  : style.css                                │                                                                                                                                                       ║
╟──────────────────────────────────────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╢

vs

https://github.com/automattic/themes/blob/fix-theme-json-validation-workflow/kiosko/style.css#L8-L9

@jffng
Copy link
Contributor

jffng commented Sep 17, 2024

Looking at the theme files, it seems like it's detecting problems that are not actually there:

For some reason the #8053 formatting changes also broke the getThemeMetadata function. Fixed in #8174, apologies I didn't see you had already started this PR @vcanales !

@vcanales
Copy link
Contributor Author

This is superseded by #8174, which solves the problems I was running into with this attempt.

@vcanales vcanales closed this Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Automation Tools [Type] Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants