-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Saving a spacer block without a height value causes a block validation error #68817
Comments
Hey @carolinan, I could see the same behavior after following the steps mentioned - Screen.Recording.2025-01-22.at.09.57.25.movI am looking further for the cause and possible fix. |
Hi @himanshupathak95 May I suggest that additional testing is mainly needed for issues that has the label "needs testing". |
I'm seeing at least three recent PRs fixing Spacer block controls, but are linked to different issues. I wonder if they're related. |
Note: I did not test the width. I forgot that setting even existed. |
There wouldn't be any block validation error when setting up the width as there's no default value provided in the However, I've noticed two minor bugs (maybe out of the scope of this issue) with the way the Screen.Recording.2025-01-22.at.5.49.28.PM.movii. The Screen.Recording.2025-01-22.at.5.57.56.PM.movI believe it's best to create a combined separate issue for the |
Thank you for checking. |
Description
If you delete the value of the height option and save, and then refresh the page (or leave and return to edit the content later), there is a block validation error.
I only tested this with block themes that have a theme.json. I tested with the default spacing presets and with custom presets.
When there is a custom spacing preset that uses clamp, like in Twenty Twenty-Five, there is one more issue.
If you select a spacing preset, then toggle the "use size preset" button so that the size input and unit input options show again, and then change the unit but not the size, then the size is also missing and the same block validation error shows.
Step-by-step reproduction instructions
Insert a spacer block.
Delete the value of the height option and save, and then refresh the page.
Screenshots, screen recording, code snippet
Environment info
WordPress 6.7.1 with and without Gutenberg trunk.
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: