-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] RegressionRelated to a regression in the latest releaseRelated to a regression in the latest release
Description
Description
Pattern block as a post template is not working anymore on the latest versions of Gutenberg. If fires an error on the block editor load, and breaks the block.
We realized that while testing Sensei LMS plugin on WP 6.4 because some custom post types are now broken there. It's also reported in Automattic/sensei#7262 as part of one of the Sensei post types.
Step-by-step reproduction instructions
- Create a new post type with a template by using the following snippet:
add_action( 'init', function() { register_post_type( 'my-test', [ 'public' => true, 'show_in_rest' => true, 'template' => [ [ 'core/pattern', [ 'slug' => 'core/simple-header-with-dark-background' ], ], ] ] ); } );
- Create a new post of this new post type.
- See the error in the editor.
- Open the browser console and see the JS error.
Screenshots, screen recording, code snippet
Environment info
- Tested on WP 6.4 RC2 or with Gutenberg plugin activated version 17.0.0-rc.1.
- Reproduced on Chrome and Firefox.
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
Metadata
Metadata
Assignees
Labels
[Status] In ProgressTracking issues with work in progressTracking issues with work in progress[Type] RegressionRelated to a regression in the latest releaseRelated to a regression in the latest release
