You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Broken preset duotone filters in classic themes #49293
When switching from a block theme to a classic theme, preset duotone filters are broken.
I would expect to see a correct filter if a default filter was selected, or no filter if a theme filter was selected (since the preset won't exist on a classic theme).
Additionally, with #49103 merged, preventing default duotone filters from being output on every page, we may be able to bring back the default filters in the duotone selector that were removed in #38681.
Step-by-step reproduction instructions
Create a post using a block theme that has default duotone filters available
Insert a block that supports duotone such as core/cover
Select one of the default filters for the bloc and save the post
Switch to a classic theme such as Twenty Nineteen
Open the post again and see that a broken filter is applied
Screenshots, screen recording, code snippet
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.
I went down one WordPress version at a time to determine when this problem started. This problem has been occurring since WordPress 6.0. So it may be a regression that went unnoticed for a long time.
Thinking back, #38681 was in response to WP 5.9 adds default Duotones before closing the body. Now that that issue has been more properly resolved, we can probably bring back the default duotone filters in classic themes—they will no longer get added to every page load.
Additionally, for filters that don't exist (such as a block theme's custom duotone filters), the fallback behavior should be an unfiltered image rather than an image with a broken filter like is shown in the screenshot.
EDIT: I updated the title and description to reflect this.
I retested on WP 7.1.2 with Gutenberg trunk (late July 2026) using Twenty Nineteen and Twenty Twenty-One. A default duotone preset (Dark grayscale) now renders correctly both in the editor and on the front end: the SVG filter is output and applied. A preset that doesn't exist in the classic theme falls back to no filter instead of a broken one. Both expectations in the description seem to be met now, so I'm closing this. Please reopen if you still see a broken filter.
Activity
t-hamano commentedon Mar 23, 2023
I went down one WordPress version at a time to determine when this problem started. This problem has been occurring since WordPress 6.0. So it may be a regression that went unnoticed for a long time.
t-hamano commentedon Mar 23, 2023
From my research, I believe this is the intended behavior.
The
defaultDuotoneis explicitly disabled in the WordPress core codebase for classic themes withouttheme.json:https://github.com/WordPress/wordpress-develop/blob/77883f97fc63ee260f6229576d31e6bc0dd80ebf/src/wp-includes/class-wp-theme-json-resolver.php#L315-L316
This change is part of #38681 in Gutenberg.
ajlende commentedon Mar 23, 2023
Thanks for digging that up!
Thinking back, #38681 was in response to WP 5.9 adds default Duotones before closing the body. Now that that issue has been more properly resolved, we can probably bring back the default duotone filters in classic themes—they will no longer get added to every page load.
Additionally, for filters that don't exist (such as a block theme's custom duotone filters), the fallback behavior should be an unfiltered image rather than an image with a broken filter like is shown in the screenshot.
EDIT: I updated the title and description to reflect this.
[-]Missing default duotone filters in classic themes[/-][+]Broken preset duotone filters in classic themes[/+]youknowriad commentedon Oct 7, 2026
I retested on WP 7.1.2 with Gutenberg trunk (late July 2026) using Twenty Nineteen and Twenty Twenty-One. A default duotone preset (Dark grayscale) now renders correctly both in the editor and on the front end: the SVG filter is output and applied. A preset that doesn't exist in the classic theme falls back to no filter instead of a broken one. Both expectations in the description seem to be met now, so I'm closing this. Please reopen if you still see a broken filter.