Duotone: Caching breaks duotones set through theme.json #36208
Labels
[Feature] Design Tools
Tools that impact the appearance of blocks both to expand the number of tools and improve the experi
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
Description
When a duotone filter is set through theme.json, the SVGs are output to the footer using a side effect of
gutenberg_render_duotone_filter_preset
. This happens the first time that Global Styles are generated. However, once this has happened the output value is cached. Once the cache is primed, Global Styles aren't generated in the code anymore, which means the side effect ofgutenberg_render_duotone_filter_preset
doesn't happen and the SVGs aren't output. This means that all images with a duotone applied via theme.json disappear.Step-by-step reproduction instructions
gutenberg/lib/compat/wordpress-5.9/get-global-styles-and-settings.php
Line 79 in 3e84b56
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: