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

WordPress Trac noreply at wordpress.org
Wed Jun 9 21:52:58 UTC 2021


#53375: Loading seperate core block assets tries to load stylesheets on blocks that
dosn't have styles
--------------------------+-----------------------------
 Reporter:  walbo         |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In [51102] support for adding inline styles for all blocks was added, but
 this makes WP register styles to non-existing stylesheets.

 Steps to replicate:
 1. Add `add_filter( 'should_load_separate_core_block_assets',
 '__return_true' );`
 2. Insert a block that dosn't have a block css. Ex. core/column.
 3. Visit the page and check the network tab to confirm that WP tries to
 load `/wp-includes/blocks/column/style.css` with status 404.

 In Gutenberg this was fixed by adding `false` url to blocks that dosn't
 have a stylesheet. See https://github.com/WordPress/gutenberg/pull/32275

 Related: #53358

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


More information about the wp-trac mailing list