[wp-trac] [WordPress Trac] #53375: Loading separate core block assets tries to load stylesheets on blocks that doesn't have styles

WordPress Trac noreply at wordpress.org
Tue Jun 29 00:08:08 UTC 2021


#53375: Loading separate core block assets tries to load stylesheets on blocks that
doesn't have styles
------------------------------+----------------------
 Reporter:  walbo             |       Owner:  desrosj
     Type:  defect (bug)      |      Status:  closed
 Priority:  normal            |   Milestone:  5.8
Component:  Editor            |     Version:  trunk
 Severity:  normal            |  Resolution:  fixed
 Keywords:  has-patch commit  |     Focuses:
------------------------------+----------------------
Changes (by desrosj):

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


Comment:

 In [changeset:"51254" 51254]:
 {{{
 #!CommitTicketReference repository="" revision="51254"
 Editor: Prevent block stylesheets from loading when they do not exist.

 This fixes an issue where block stylesheets were being loaded even if they
 did not exist, causing 404 errors. The issue presented itself when the
 site was choosing to load block assets individually through the
 `should_load_separate_core_block_assets` filter hook.

 This also fixes an issue where non-Core blocks would only be registered if
 they actually had asset files. This prevents developers from adding
 additional information to a style handle, such as inline styles through
 `wp_add_inline_style()`.

 Props walbo, jorbin, aristath, desrosj, hellofromTonya.
 Fixes #53375.
 }}}

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


More information about the wp-trac mailing list