Make WordPress Core

Opened 2 months ago

Last modified 3 weeks 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's profile aljullu Owned by: aljullu's profile 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:

  1. Assuming you are using a theme with a page.html template (ie: Twenty Twenty Four).
  2. 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' ],
                ]
        );
} );
  1. Go to the New page screen.
  2. Click on the Pages button next to the Templates label.
  3. Notice a flash.

Change History (8)

This ticket was mentioned in PR #7676 on WordPress/wordpress-develop by @aljullu.


2 months ago
#1

  • Keywords has-patch added

@aljullu commented on PR #7676:


2 months 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.

@aljullu commented on PR #7676:


2 months 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!

@apermo commented on PR #7676:


2 months ago
#4

Thanks for the approval, @apermo! I don't have merging rights, is that something you can take care of?

I can't merge either, this happens on the subversion by those with commit right(core commiters), I just reviewed.

#5 @azaozz
6 weeks ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to 6.8

Seems this has been in Gutenberg for a while and needs adding to core.

@ntsekouras commented on PR #7676:


5 weeks ago
#6

This looks good, but I'd appreciate some more eyes maybe from @anton-vlasenko or @felixarntz ?

@aljullu commented on PR #7676:


5 weeks ago
#7

Thanks for the review, @ntsekouras! I answered/applied the feedback.

@aljullu commented on PR #7676:


3 weeks ago
#8

@felixarntz I don't have permissions to merge into WordPress, is that something you or somebody else can take care of? :pray:

I see there are a couple of checks failing, but they seem unrelated to this PR.

Note: See TracTickets for help on using tickets.