-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Template part areas display as "undefined" in the template editor #37443
Comments
I think we forgot to backport this part of the editor settings into the WP core. I'm not able to reproduce this with the Gutenberg trunk. gutenberg/lib/editor-settings.php Lines 27 to 29 in b383713
|
Would that be in get_default_block_editor_settings()? https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/block-editor.php#L154 Or get_block_editor_settings() https://github.com/WordPress/wordpress-develop/blob/trunk/src/wp-includes/block-editor.php#L300 |
I can't reproduce this locally with WP trunk plus the package updates for Beta 4. |
WordPress Core's changeset 52232 added the $block_editor_context = new WP_Block_Editor_Context();
$custom_settings = array(
'siteUrl' => site_url(),
'postsPerPage' => get_option( 'posts_per_page' ),
'styles' => get_block_editor_theme_styles(),
'defaultTemplateTypes' => $indexed_template_types,
'defaultTemplatePartAreas' => get_allowed_block_template_part_areas(),
'__experimentalBlockPatterns' => WP_Block_Patterns_Registry::get_instance()->get_all_registered(),
'__experimentalBlockPatternCategories' => WP_Block_Pattern_Categories_Registry::get_instance()->get_all_registered(),
);
$editor_settings = get_block_editor_settings( $custom_settings, $block_editor_context ); I'm not seeing other changes to that setting in Core since that commit. And |
Removing the backport label until the needed backport is identified. |
Changeset 52232 changes wp-admin/site-editor.php, is that used for the template editor? Which is part of the block editor, not the site editor. |
How did you add the template part? I am still unable to add a template part block using 5.9-beta4-52408-src. |
I was able to reproduce this with beta 4. It should be fixed via a core patch, and I will create it shortly. |
Core PR: WordPress/wordpress-develop#2076 |
The core patch got merged - https://core.trac.wordpress.org/changeset/52409. I am closing the issue since there's no change required on the plugin side. |
Description
When you add a template part in the template editor, (either template part, header, or footer aliases) and select "Choose existing",
the area displays as "Undefined".
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Environment info
WordPress 5.9.0 beta 3 via the beta tester
With and without Gutenberg trunk.
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
The text was updated successfully, but these errors were encountered: