[wp-trac] [WordPress Trac] #54844: Unnecessary database queries when a block theme isn't in use

WordPress Trac noreply at wordpress.org
Sat Feb 12 07:46:11 UTC 2022


#54844: Unnecessary database queries when a block theme isn't in use
-----------------------------------+------------------------------------
 Reporter:  johnbillion            |       Owner:  audrasjb
     Type:  defect (bug)           |      Status:  closed
 Priority:  normal                 |   Milestone:  5.9.1
Component:  Query                  |     Version:  5.8
 Severity:  normal                 |  Resolution:  fixed
 Keywords:  has-patch fixed-major  |     Focuses:  template, performance
-----------------------------------+------------------------------------
Changes (by audrasjb):

 * status:  reopened => closed
 * resolution:   => fixed


Comment:

 In [changeset:"52716" 52716]:
 {{{
 #!CommitTicketReference repository="" revision="52716"
 Query: Check if the theme supports `block-templates` before calling
 `locate_block_template()` in `get_query_template()`.

 This change improves performance for classic themes by removing an
 unnecessary query and fixes an issue where a classic theme would show
 "Empty template: Index" on the frontend when an empty
 `(block-)templates/index.html` file exists.

 Props johnbillion, ianatkins, Mamaduka, costdev, manfcarlo, dolphingg,
 audrasjb, madeinua, kapilpaul, rafiahmedd, SergeyBiryukov.
 Merges [52697] to the 5.9 branch.
 Fixes #54844.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54844#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list