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 Editor breaks after updating to Gutenberg 19.8.0 - Blocks missing inside the editor #67875

Closed
2 of 6 tasks
CreativeDive opened this issue Dec 12, 2024 · 4 comments · Fixed by #67879
Closed
2 of 6 tasks
Assignees
Labels
[Feature] Template Editing Mode Related to the template editor available in the Block Editor [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@CreativeDive
Copy link
Contributor

Description

Hey,

since Gutenberg version 19.8.0 something strange is happening. Before this update or without the active Gutenberg plugin installed, everything worked as expected.

Now the complete block editor is empty and has no block content. In my case, this affects the page post type only. Other post types seem to work correctly.

This is only related to the new version 19.8.0 of the Gutenberg plugin. There are no console errors or anything like that. Watch the video to see what happens.

So I debugged it and found the reason why this problem occurs.

In my theme I use:

if ( ! function_exists( 'panther_setup_theme' ) ) :
    function panther_setup_theme() {
        remove_theme_support( 'block-templates' );
    }
endif;

add_action( 'after_setup_theme', 'panther_setup_theme' );

After commenting this out, this problem is solved.

This is a bug that needs to be fixed urgently.

Step-by-step reproduction instructions

See the issue description.

Screenshots, screen recording, code snippet

edtor-is-empty-after-update.mp4

Environment info

  • WP 6.7.1
  • Gutenberg 19.8.0
  • Google Chrome Browser latest

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

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure
@CreativeDive CreativeDive added the [Type] Bug An existing feature does not function as intended label Dec 12, 2024
@Mamaduka Mamaduka added the [Feature] Template Editing Mode Related to the template editor available in the Block Editor label Dec 12, 2024
@Mamaduka
Copy link
Member

@CreativeDive, are you using a block theme or a classic? I think I know the reason for the failure, but I want to be sure I covered all the cases.

@CreativeDive
Copy link
Contributor Author

@Mamaduka I have a theme.json inside the theme folder. So I think it's a block theme.

In my case I builded an own template system, I don't use the FSE template feature, so template support is disabled via remove_theme_support( 'block-templates' );

@Mamaduka
Copy link
Member

@CreativeDive, #67879, should fix the bug.

You can use the snippet below to fix the issue temporarily, until new Gutenberg plugin is release.

add_filter( 'register_post_type_args', function( $args ) {
	unset( $args['default_rendering_mode'] );
	return $args;
}, 20 );

@CreativeDive
Copy link
Contributor Author

@Mamaduka Thank you for sharing this snippet to temporary fix this issue. It's working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Template Editing Mode Related to the template editor available in the Block Editor [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants