-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Labels
Backwards CompatibilityIssues or PRs that impact backwards compatabilityIssues or PRs that impact backwards compatability[Feature] Block Validation/DeprecationHandling block validation to determine accuracy and deprecationHandling block validation to determine accuracy and deprecation[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Description
After updating from Gutenberg 14.9.1 to 15.4.0 I get a bunch of 'unresolvable' validation failed errors. Unfortunately the logs in the console were not helpful at all.
After some investigation I found out that the validation errors come from simple anchor tags.
In Gutenberg 14.9.1 when adding an anchor tag to a block this results in
Gutenberg 14.9.1
<!-- wp:group {"backgroundColor":"tertiary","layout":{"type":"constrained"}} -->
<div id="test" class="wp-block-group has-tertiary-background-color has-background"><!-- wp:heading -->
<h2 class="wp-block-heading">Test</h2>
<!-- /wp:heading --></div>
<!-- /wp:group -->
When I paste this code into an editor with Gutenberg v.15.4.0 this results in one of these
'unresolvable' validation failed errors (after a reload)
I found that that is simply because of the missing "anchor": "test" in the attributes.
Gutenberg v.15.4.0
<!-- wp:group {"align":"wide","backgroundColor":"tertiary","layout":{"type":"constrained"},"anchor":"test"} -->
<div class="wp-block-group alignwide has-tertiary-background-color has-background" id="test"><!-- wp:heading -->
<h2 class="wp-block-heading">Test</h2>
<!-- /wp:heading --></div>
<!-- /wp:group -->
That is an annoying situation since that does not only removes the anchor tags but also
requires to redo all the editing again.
Step-by-step reproduction instructions
- wp plugin install gutenberg --version=14.9.1 --force
- add a group block with an anchor tag / HTML Anchor and some child blocks inside
- copy the block markup
- wp plugin update gutenberg (update to 15.4.0)
- paste block markup, save and reload site, check console
Screenshots, screen recording, code snippet
Environment info
No response
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
Metadata
Metadata
Assignees
Labels
Backwards CompatibilityIssues or PRs that impact backwards compatabilityIssues or PRs that impact backwards compatability[Feature] Block Validation/DeprecationHandling block validation to determine accuracy and deprecationHandling block validation to determine accuracy and deprecation[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
