Make WordPress Core

Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#54917 closed enhancement (duplicate)

Block template - missed check for support

Reported by: madeinua's profile madeinua Owned by:
Milestone: Priority: normal
Severity: minor Version: 5.9
Component: Themes Keywords: has-patch has-unit-tests
Focuses: template Cc:

Description

I suppose this part is missed at the beginning of locate_block_template():

if ( ! current_theme_supports( 'block-templates' ) ) {
    return $template;
}

Attachments (2)

54917.diff (593 bytes) - added by kapilpaul 2 years ago.
Created patch
54917.2.diff (1.0 KB) - added by kapilpaul 2 years ago.
updated patch

Download all attachments as: .zip

Change History (15)

#1 @SergeyBiryukov
2 years ago

  • Milestone changed from Awaiting Review to 5.9.1

This ticket was mentioned in PR #2246 on WordPress/wordpress-develop by kapilpaul.


2 years ago
#3

  • Keywords has-patch added

@kapilpaul
2 years ago

Created patch

#4 @costdev
2 years ago

Hi @kapilpaul, thanks for the patch!

The tests on PR 2246 are failing because block-templates support is not added until the setup_theme action has run. I've commented on the PR to request a change that will fix the tests so that this fix can be considered for commit.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


2 years ago

This ticket was mentioned in Slack in #core by rafiahmedd. View the logs.


2 years ago

This ticket was mentioned in Slack in #core by costdev. View the logs.


2 years ago

This ticket was mentioned in PR #2290 on WordPress/wordpress-develop by rafiahmedd.


2 years ago
#8

  • Keywords has-unit-tests added

This ticket was mentioned in Slack in #core by rafiahmedd. View the logs.


2 years ago

@kapilpaul
2 years ago

updated patch

kapilpaul commented on PR #2246:


2 years ago
#10

@costdev Thanks for reviewing it. updated the test case as you mentioned.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


2 years ago

#12 @audrasjb
2 years ago

  • Milestone 5.9.1 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Closing in favor of #54844.
See this comment: https://core.trac.wordpress.org/ticket/54844#comment:18

Note: See TracTickets for help on using tickets.