Make WordPress Core

Opened 13 months ago

Closed 13 months ago

Last modified 13 months ago

#58615 closed enhancement (fixed)

Backport 6.3: REST API Template Controller ignore empty templates

Reported by: ramonopoly's profile ramonopoly Owned by: isabel_brison's profile isabel_brison
Milestone: 6.3 Priority: normal
Severity: normal Version: 6.3
Component: REST API Keywords: has-patch has-unit-tests gutenberg-merge
Focuses: Cc:


This ticket tracks the backport of to WordPress 6.3

Ignore empty templates when using the /lookup endpoint in the WP_REST_Templates_Controller class.

props @jorgefilipecosta

Change History (3)

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

13 months ago

Backporting changes from

Ignore empty templates when looking up a fallback template.

I've copied the changes across from but might need a second eye from @jorgefilipecosta or @youknowriad to confirm.

props @jorgefilipecostac

Test npm run test:php -- --filter Tests_REST_WpRestTemplatesController

Trac ticket:

#2 @isabel_brison
13 months ago

  • Owner set to isabel_brison
  • Resolution set to fixed
  • Status changed from new to closed

In 56051:

REST API: ignore empty templates.

Ignore empty templates when using the /lookup endpoint in the WP_REST_Templates_Controller class.

Props ramonopoly, jorgefilipecosta, spacedmonkey, youknowriad, mukesh27.
Fixes #58615.

@isabel_brison commented on PR #4689:

13 months ago

committed in r56051 / a44e46b.

Note: See TracTickets for help on using tickets.