#59472 closed defect (bug) (fixed)
Beta 1: Edit post shows block validation failed for `core/heading`
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 6.4 | Priority: | normal |
| Severity: | normal | Version: | 6.4 |
| Component: | Bundled Theme | Keywords: | needs-testing has-patch |
| Focuses: | administration | Cc: |
Description
The beta1 shows jQuery error in browser console.
Error:
blocks.min.js?ver=6dacee963fadc2f97b48:10 Block validation: Block validation failed for `core/heading` ({name: 'core/heading', icon: {…}, keywords: Array(2), attributes: {…}, providesContext: {…}, …}).
Content generated by `save` function:
<h2 class="wp-block-heading screen-reader-text">Posts</h2>
Content retrieved from post body:
<h1 class="wp-block-heading screen-reader-text">Posts</h1>
Check attached screenshot for more info.
Attachments (2)
Change History (14)
#2
@
2 years ago
I wonder where this is coming from? I can see the warning, too. If I manually copy in markup that includes the block comment specifying the correct heading level, it seems to work okay for me in 6.4:
<!-- wp:heading {"level":1,"className":"screen-reader-text"} -->
<h1 class="wp-block-heading screen-reader-text">Posts</h1>
<!-- /wp:heading -->
Could there be a block pattern (or preview) somewhere that has illegal markup or is missing the level in the block comment delimiter?
#3
@
2 years ago
- Component changed from Editor to Bundled Theme
Hi!
This is a known problem with the markup in the theme Twenty Twenty-Four, not the editor component. Luckily, there is already a pull request merged for this in the Twenty Twenty-Four GitHub repository.
It will be resolved next time the theme files are updated with the changes from GitHub.
#4
@
2 years ago
This was also discussed on Slack, and decided to be non-blocking for 6.4 Beta 1 during the so called "release party".
An account is needed to read the conversation:
https://wordpress.slack.com/archives/C02RQBWTW/p1695756022664579
#6
@
2 years ago
- Summary changed from Beta 1: Edit post shows block validation failed for `core/heading` to Bundled Theme: In Twenty Twenty-Four edit post shows block validation failed for `core/heading`
#7
@
2 years ago
- Summary changed from Bundled Theme: In Twenty Twenty-Four edit post shows block validation failed for `core/heading` to Beta 1: Edit post shows block validation failed for `core/heading`
I am not aware of a tracking issue for updating Twenty Twenty-Four.
#8
@
2 years ago
Sorry I did not intend to change the Summary, we just happened to be editing at the same time.
This ticket was mentioned in PR #5328 on WordPress/wordpress-develop by @andrewserong.
2 years ago
#9
- Keywords has-patch added; needs-patch removed
Fix broken markup for Portfolio Index Template pattern in TT4, which appears to be the cause of a validation error in the console when opening the post editor.
Trac ticket: https://core.trac.wordpress.org/ticket/59472
To test, prior to applying this PR, you should see an error in the console:
With this PR applied, after reloading the editor, the error should no longer appear. If you wish to double-check the pattern renders correctly, it can be viewed within the Patterns page in the site editor: /wp-admin/site-editor.php?path=%2Fpatterns — then filter by portfolio index in the search field to see the preview of that pattern. The full URL if running the Docker-based local testing environment is: http://localhost:8889/wp-admin/site-editor.php?path=%2Fpatterns
#10
@
2 years ago
Apologies I missed the discussion here before opening the PR. Feel free to ignore that PR if you have a sync process that will overwrite it. Thank you!
#11
@
2 years ago
- Milestone changed from Awaiting Review to 6.4
- Resolution set to fixed
- Status changed from new to closed
Hello all,
Thank you for reporting this issue.
I happened to find it yesterday too before the release party started. It only happened with TT4. Switching to TT3 resolved it.
As @poena noted, there is a fix that has already been merged into the TT4 GitHub repo:
https://github.com/WordPress/twentytwentyfour/pull/500
That fix will be part of the theme update that gets committed into Core ahead of 6.4 Beta 2 release.
As this issue is resolved, I'll close this ticket as fixed.
@andrewserong commented on PR #5328:
2 years ago
#12
I'll close out this linked PR, as the issue will be fixed once https://github.com/WordPress/twentytwentyfour/pull/500/ is merged into core. Thanks folks!
The above screenshot is from Microsoft edge, but WordPress version is 6.3.1