[wp-trac] [WordPress Trac] #55184: Custom style handle attached to a custom block style is never load even if the block is in the page.

WordPress Trac noreply at wordpress.org
Wed Sep 28 21:57:49 UTC 2022


#55184: Custom style handle attached to a custom block style is never load even if
the block is in the page.
-----------------------------+------------------------------
 Reporter:  alexandrebuffet  |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Script Loader    |     Version:  5.9
 Severity:  normal           |  Resolution:
 Keywords:  needs-patch      |     Focuses:
-----------------------------+------------------------------
Changes (by pagelab):

 * keywords:   => needs-patch


Comment:

 I can also confirm the bug. AFAIK the issue is that the patch on #54457
 uses the `render_block()` filter in the `enqueue_block_styles_assets`
 function to conditionally enqueue the registered block style, but this
 function runs on the `enqueue_block_assets` hook (see `wp-includes
 \default-filters.php`), which is too late for `render_block()`.

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


More information about the wp-trac mailing list