[wp-trac] [WordPress Trac] #56644: Global styles don't work for most blocks (paragraphs, headings, buttons etc).

WordPress Trac noreply at wordpress.org
Tue Sep 27 06:44:32 UTC 2022


#56644: Global styles don't work for most blocks (paragraphs, headings, buttons
etc).
------------------------------+---------------------
 Reporter:  jorgefilipecosta  |       Owner:  (none)
     Type:  defect (bug)      |      Status:  new
 Priority:  high              |   Milestone:  6.1
Component:  Editor            |     Version:  trunk
 Severity:  major             |  Resolution:
 Keywords:  needs-patch       |     Focuses:
------------------------------+---------------------

Comment (by andrewserong):

 Thanks for writing this up @jorgefilipecosta! I can reproduce the issue,
 too. I did a little hacking around and found that in TwentyTwentyTwo
 theme, the only block styles that appear to be output in global styles are
 dynamic blocks, in case that helps hone in on the issue at all.

 Also, interestingly, if I update the init action for
 `register_core_block_types_from_metadata` to have a priority of `1`, that
 seems to get all the global styles in TwentyTwentyTwo theme working again
 (most obviously, the Button block). This is the line:
 https://github.com/WordPress/wordpress-
 develop/blob/537e5239f94853049ce84e815ddf15f8ecf7d259/src/wp-
 includes/blocks/index.php#L29

 So, that does seem to point toward a caching issue / order of calls of
 some kind, as you've described above.

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


More information about the wp-trac mailing list