[wp-trac] [WordPress Trac] #58299: Block template is located twice in `get_query_template()`

WordPress Trac noreply at wordpress.org
Mon Jun 26 13:49:37 UTC 2023


#58299: Block template is located twice in `get_query_template()`
--------------------------+--------------------------
 Reporter:  dlh           |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  6.3
Component:  Themes        |     Version:  5.9
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  performance
--------------------------+--------------------------

Comment (by Bernhard Reiter):

 Replying to [ticket:58299 dlh]:

 > Adding `locate_block_template()` as a filter on `{$type}_template` would
 have been necessary in the Gutenberg plugin, but not in core, given the
 call that was added directly to `get_query_template()`.

 This seems like a plausible explanation; we might've overlooked the
 filters when backporting the code from Gutenberg to Core.

 I'll try and test this in a bit; I'd say that most importantly, we'll need
 to verify that the correct template is used when rendering a given page on
 the frontend, and that the site editor also continues to work as before
 (with a special focus on what templates are displayed as available, and
 that the correct template is loaded and also saved when making changes).

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


More information about the wp-trac mailing list