Opened 5 weeks ago
Last modified 5 days ago
#62319 assigned defect (bug)
There is a flash when clicking the template name in the editor if a plugin registered template matches a default WP theme template
Reported by: | aljullu | Owned by: | aljullu |
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | 6.7 |
Component: | Editor | Keywords: | has-patch needs-testing |
Focuses: | ui, template | Cc: |
Description
Same as this GitHub issue: https://github.com/WordPress/gutenberg/issues/65584
Steps to reproduce:
- Assuming you are using a theme with a
page.html
template (ie: Twenty Twenty Four). - Add this code snippet to your site:
<?php add_action( 'init', function() { register_block_template( 'templates//page', [ 'title' => 'My Single Page', 'description' => 'This is my single page template', 'content' => '<!-- wp:paragraph --><p>This is a plugin-registered template.</p><!-- /wp:paragraph -->', 'post_types' => [ 'page' ], ] ); } );
- Go to the New page screen.
- Click on the Pages button next to the Templates label.
- Notice a flash.
Change History (5)
This ticket was mentioned in PR #7676 on WordPress/wordpress-develop by @aljullu.
5 weeks ago
#1
- Keywords has-patch added
4 weeks ago
#2
Thanks for the review, @apermo! Would you mind taking another look? I added a couple of commits that fix some edge cases and add unit tests.
3 weeks ago
#3
Thanks for the approval, @apermo! I don't have merging rights, is that something you can take care of?
Otherwise, @azaozz, wondering if this is something you can do? Thanks in advance!
Note: See
TracTickets for help on using
tickets.
This PR includes the changes that need to be backported from https://github.com/WordPress/gutenberg/pull/66359 into WC core.
Trac ticket: https://core.trac.wordpress.org/ticket/62319