[wp-trac] [WordPress Trac] #55902: Block theme rendering issue

WordPress Trac noreply at wordpress.org
Wed Aug 3 13:46:17 UTC 2022


#55902: Block theme rendering issue
--------------------------+------------------------------
 Reporter:  jivansoft     |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Themes        |     Version:
 Severity:  blocker       |  Resolution:
 Keywords:  needs-patch   |     Focuses:  template
--------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:  changes-requested => needs-patch
 * component:  General => Themes


Old description:

> Hi,
>
> I am from Pagelayer team.
>
> And we have checked and found that in the “wp-includes/template-
> canvas.php” file, you have called the function
> “get_the_block_template_html()” above the header that breaks the flow of
> the calling hooks like (‘get_header, wp_enqueue_scripts, wp_header’).
>
> For example, If we add any “the_content” hook inside the
> “wp_enqueue_scripts” hook, then the “the_content” hook not working
> properly.
>
> Please check and try fix the issue ASAP if possible.

New description:

 Hi,

 I am from Pagelayer team.

 And we have checked and found that in the `wp-includes/template-
 canvas.php` file, you have called the function
 `get_the_block_template_html()` above the header that breaks the flow of
 the calling hooks like (`get_header`, `wp_enqueue_scripts`, `wp_header`).

 For example, If we add any `the_content` hook inside the
 `wp_enqueue_scripts` hook, then the `the_content` hook not working
 properly.

 Please check and try fix the issue ASAP if possible.

--

Comment:

 A patch would need to consider the reasoning behind calling the function
 early: to avoid loading all block assets in the footer (see GB28319).

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


More information about the wp-trac mailing list