[wp-trac] [WordPress Trac] #62755: Allow template duplication + concept of active templates
WordPress Trac
noreply at wordpress.org
Thu Oct 23 06:59:04 UTC 2025
#62755: Allow template duplication + concept of active templates
-----------------------------+-----------------------
Reporter: ellatrix | Owner: ellatrix
Type: enhancement | Status: reopened
Priority: normal | Milestone: 6.9
Component: Editor | Version: trunk
Severity: normal | Resolution:
Keywords: gutenberg-merge | Focuses:
-----------------------------+-----------------------
Comment (by dd32):
Oh here's another one, Query Monitor can trigger a similar warning, when
calling other template functions. This is probably less expected though.
> WARNING: wp-includes/block-template.php:247 - Undefined array key "page-
downloads"
> require('wp-blog-header.php'), require_once('wp-includes/template-
loader.php'), do_action('template_redirect'), WP_Hook->do_action,
WP_Hook->apply_filters, **QM_Collector_Theme->action_template_redirect,
get_index_template**, get_query_template, locate_block_template,
resolve_block_template, usort, {closure}
In that case, `$object` and all that will be as expected, but the
templates will be more limited:
{{{
slug_priorities' =>
array (size=1)
'index' => int 0
'templates' =>
array (size=2)
0 =>
object(WP_Block_Template)[3977]
public 'type' => string 'wp_template' (length=11)
public 'theme' => string 'wporg-main-2022' (length=15)
public 'slug' => string 'index' (length=5)
.....
1 =>
object(WP_Block_Template)[3981]
public 'type' => string 'wp_template' (length=11)
public 'theme' => string 'wporg-main-2022' (length=15)
public 'slug' => string 'page-download' (length=22)
.....
'object' =>
object(WP_Post)[3829]
.....
public 'post_name' => string 'downloads'
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62755#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list