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

block.json schema supports.typography.fontSize|lineHeight out of date #37707

Closed
grappler opened this issue Jan 4, 2022 · 4 comments · Fixed by #37853
Closed

block.json schema supports.typography.fontSize|lineHeight out of date #37707

grappler opened this issue Jan 4, 2022 · 4 comments · Fixed by #37853
Assignees
Labels
Needs Testing Needs further testing to be confirmed. [Status] In Progress Tracking issues with work in progress

Comments

@grappler
Copy link
Member

grappler commented Jan 4, 2022

Description

The schema for fontSize and lineHeight has not been updated with the change from supports.fontSize to supports.typography.fontSize and supports.lineHeight to supports.typography.lineHeight.

https://github.com/WordPress/gutenberg/blob/trunk/schemas/json/block.json

Related issues: #36894, #32600

Step-by-step reproduction instructions

  1. Create a block with a block.json
  2. Extend theblock.json with the following code
  "$schema": "https://schemas.wp.org/wp/5.8/block.json",
  "supports": {
    "fontSize": false,
    "lineHeight": false
  }
  1. There are no errors in Visual Studio Code based on the schema
  2. When loading the site the following error is shown

register_block_type_from_metadata() was called incorrectly. Block "pszh/cover" is declaring fontSize support in block.json file under supports.fontSize. fontSize support is now declared under supports.typography.fontSize. Please see Debugging in WordPress for more information. (This message was added in version 5.8.0.)

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress 5.8

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

@karmatosed karmatosed added the Needs Testing Needs further testing to be confirmed. label Jan 4, 2022
@gziolo
Copy link
Member

gziolo commented Jan 10, 2022

@oandregal or @jorgefilipecosta, can you validate this report? Thank you.

@oandregal
Copy link
Member

Prepared #37853 to update the schema.

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 11, 2022
@grappler
Copy link
Member Author

Thank you @oandregal for fixing this. Will this be back ported to the wp/5.8 branch so that the schema in https://schemas.wp.org/wp/5.8/block.json is also correct?

https://github.com/WordPress/gutenberg/blob/wp/5.8/schemas/json/block.json

@oandregal
Copy link
Member

Prepared #37913 for updating the wp/5.8 branch as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Testing Needs further testing to be confirmed. [Status] In Progress Tracking issues with work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants