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 validation failed for core/group #48911

Closed
SabathMedia opened this issue Mar 8, 2023 · 9 comments
Closed

Block validation failed for core/group #48911

SabathMedia opened this issue Mar 8, 2023 · 9 comments
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Block] Group Affects the Group Block (and row, stack and grid variants)

Comments

@SabathMedia
Copy link

Description

I get this message for every page (event for empty/new pages):
Block validation failed for 'core/group'.

Step-by-step reproduction instructions

  1. Create an empty page.

Screenshots, screen recording, code snippet

Content generated by `save` function:

<div class="wp-block-group alignfull has-background-color has-white-color has-black-background-color has-text-color has-background has-link-color" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--40)"></div>

Content retrieved from post body:

<div class="wp-block-group alignfull has-background-color has-white-color has-black-background-color has-text-color has-background has-link-color" style="min-height:40vh;margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--60);padding-right:var(--wp--preset--spacing--40);padding-bottom:var(--wp--preset--spacing--60);padding-left:var(--wp--preset--spacing--40)">

</div>

Environment info

WordPress 6.1.1 (Fresh installation, no plugins, default theme).
Gutenberg
PHP 8.0
MySQL 8.0.16

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

Yes

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

Yes

@Mamaduka Mamaduka added Needs Testing Needs further testing to be confirmed. [Block] Group Affects the Group Block (and row, stack and grid variants) labels Mar 8, 2023
@gocemitevski
Copy link

I'm getting the same error under wp-env for all existing and new pages. This appears to be a problem in https://c0.wp.com/c/6.1.1/wp-includes/js/dist/blocks.min.js line 10.

@jmaleman
Copy link

jmaleman commented Mar 8, 2023

The same here! But I don't have installed Gutenberg plugin. When I install Gutenberg this error disappear. 😑

@metropoliscreative
Copy link

I am also getting these block validation errors for the 'core/group' block on multiple sites with all plugins disabled, not using the Gutenberg plugin. I'm pretty sure this started within the last 24 hours.

@kylegilman
Copy link

This has been driving me crazy! I'm developing a custom block and I thought I had done something really serious. I created a new, clean site and tested in Chrome & Edge on Windows, and on Safari on Mac. I got the same errors in the console. I also believe it started in the last 24 hours, but I can't figure out what could have changed.
WordPress 6.2-beta5 does not have the error.

@t-hamano
Copy link
Contributor

t-hamano commented Mar 9, 2023

I have identified the cause of the problem. I was able to reproduce this issue with a new WordPress 6.1.1 installation.

The problem is that some block patterns retrieved from the remote block pattern directory do not match the block support supported by WordPress 6.1.X.

As you can see in the error message, those patterns contain group blocks with the min-height style applied. min-height block support will be supported starting with WordPress 6.2, as described in this post.

Therefore, if you add the following code, the error message should not appear.

add_filter( 'should_load_remote_block_patterns', '__return_false' );

However, as noted in this comment, patterns tagged with numbers above the current WordPress version should not be included in the response.

@ryelle
If you know anything about this issue, please let us know 🙏

@t-hamano t-hamano removed the Needs Testing Needs further testing to be confirmed. label Mar 9, 2023
@SabathMedia
Copy link
Author

My quick fix was to remove "dimensions":{"minHeight":"40vh"}} and style="min-height:40vh" from the wp_options table. The options_name is _site_transient_wp_remote_block_patterns_##########.

@ndiego
Copy link
Member

ndiego commented Mar 9, 2023

Since this issue does not appear to be related specifically to 6.2, I am removing it from the project board. But please let me know if I am interpreting the issue.

@ryelle
Copy link
Contributor

ryelle commented Mar 9, 2023

Those three patterns were set as "6.1+", so they would load in 6.1. Since it sounds like they should be 6.2+, I've updated the meta on each. They should not be loaded on 6.1.x sites anymore.

@t-hamano
Copy link
Contributor

@ryelle
Thank you for your response! I have confirmed that the console error no longer appears in WordPress 6.1.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Block] Group Affects the Group Block (and row, stack and grid variants)
Projects
None yet
Development

No branches or pull requests

9 participants