Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#61110 closed defect (bug) (fixed)

Editor: Fix block template files query for a post-type

Reported by: Mamaduka Owned by: ellatrix
Priority: normal Milestone: 6.6
Component: Editor Version: 6.3
Severity: normal Keywords: has-patch has-unit-tests
Cc: Focuses:

Description

Sync ticket for https://github.com/WordPress/gutenberg/pull/61244.

Fixes a bug where block template files that aren't defined in theme.json's customTemplates were missing from get_block_templates for a post-type query.

The custom template files with no associated post-types are available for all post-types.

Note: Original regression was introduced in r55687 but only started affecting Editor users in WP 6.5.

Change History (9)

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


2 years ago
#1

  • Keywords has-patch has-unit-tests added

@Mamaduka commented on PR #6468:


2 years ago
#2

Thanks for testing, @creativecoder!

I added the explanatory comment for the data provider.

P.S. Comment support for JSON would have been handy at this moment :)

#3 @grantmkin
2 years ago

Noting here that there is discussion about the performance impact of this fix in the Gutenberg PR, starting with this comment: https://github.com/WordPress/gutenberg/pull/61244#issuecomment-2089797625

#4 @jorbin
2 years ago

  • Milestone 6.5.36.6

It was discussed on the PR to punt this from 6.5.3 and I agree so moving to 6.6 and then it can get moved to 6.5.4 for later consideration.

See: https://github.com/WordPress/gutenberg/pull/61244#issuecomment-2090756404

@vcanales commented on PR #6468:


2 years ago
#5

Hey hey @Mamaduka, are we only missing an approval?

@Mamaduka commented on PR #6468:


2 years ago
#6

@vcanales that’s correct.

@ellatrix commented on PR #6468:


2 years ago
#7

Checking blame to find people to review 😄

#8 @ellatrix
2 years ago

  • Owner set to ellatrix
  • Resolutionfixed
  • Status newclosed

In 58323:

Editor: Fix block template files query for a post-type.

See https://github.com/WordPress/gutenberg/pull/61244.
See https://github.com/WordPress/wordpress-develop/pull/6468.

Fixes #61110.

Props mamaduka, mukesh27, grantmkin, vcanales, ellatrix, oandregal.

#9 @ellatrix
2 years ago

In 58324:

Editor: add missing test template file.

Add a missing file for r58323.

See https://github.com/WordPress/wordpress-develop/pull/6468.
See #61110.

Note: See TracTickets for help on using tickets.