Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duotone filters are missing from live site when used in Classic Themes #54099

Closed
cuemarie opened this issue Aug 31, 2023 · 7 comments · Fixed by #54778
Closed

Duotone filters are missing from live site when used in Classic Themes #54099

cuemarie opened this issue Aug 31, 2023 · 7 comments · Fixed by #54778
Assignees
Labels
[Feature] Colors Color management [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@cuemarie
Copy link

Description

On sites using a classic theme, Duotone filters apply in the post editor, but don't appear on the live site

Step-by-step reproduction instructions

  1. Activate a classic theme such as Twenty Twenty One
  2. Open a new post and add an image block
  3. Add a duotone filter to the image
    • (observe that this filter appears in the editor)
  4. Save and view the post
    • (observe that the filter does not appear on the live site)

Screenshots, screen recording, code snippet

Screen.Capture.on.2023-08-31.at.14-43-58.mp4

Inspecting the image block shows wp-duotone-rgb10400-rgb255232232-1, even though the filter is not applied.

Markup on 2023-08-31 at 15:16:20

Environment info

  • WP 6.3.1
  • GB 16.5.1

Deactivating Gutenberg altogether allows the Duotone filter to appear on the live site.

Possibly related? #49293 (I can't tell if this is the same issue - it appears to just be about the default colors available, and not the function of duotone on the live site).

Many WordPress.com customers have reported this issue; those reports are being tracked here: Automattic/wp-calypso#78442

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

@jordesign jordesign added [Type] Bug An existing feature does not function as intended Backwards Compatibility Issues or PRs that impact backwards compatability [Feature] Colors Color management labels Sep 1, 2023
@bph
Copy link
Contributor

bph commented Sep 1, 2023

I can reproduce this with the theme Twenty-Twenty-Thirteen for WordPress nightly and Gutenberg nightly.
The Duotones selected don't show on the front- end.

duotones-not-in-classic.theme.mp4

@bph bph added the [Type] Regression Related to a regression in the latest release label Sep 1, 2023
@bph
Copy link
Contributor

bph commented Sep 1, 2023

Tested it with WordPress 6.2.2 (no GB plugin) and the duotone works for both, Editor and front-end.

Then I was curious, which Gutenberg plugin version broke the duotone in classic themes.
Gutenberg 15.6.2 it still worked
Gutenberg 15.7.0 it stopped working.

The regression might have been introduced via this PR

@ajlende when you get a quiet moment, could you take a look at this?

@bph bph removed the Backwards Compatibility Issues or PRs that impact backwards compatability label Sep 1, 2023
@bph bph moved this to Triage in WordPress 6.4 Editor Tasks Sep 1, 2023
@bph bph moved this from Triage to Needs Dev / Todo in WordPress 6.4 Editor Tasks Sep 8, 2023
@bph bph moved this from Needs Dev / Todo to Punted to 6.5 in WordPress 6.4 Editor Tasks Sep 18, 2023
@t-hamano
Copy link
Contributor

This issue was also reproducible in WordPress 6.3 when I activated the latest Gutenberg plugin.

  • ✅ The image block has a class called wp-duotone-XXXXXX-XXXXXXXXXXX-X in the block wrapper element.
  • ✅ A filter element with an ID attribute identical to its class name is also rendered.
  • ❌ However, the inline style for applying that filter is not output.

@nderambure
Copy link

Any update on this ?
Broken Duotone on classic themes is still there in WordPress 6.4.
I have some websites using intensively duotone to work nicely with the design of the custom theme and my eyes are burning :)

@t-hamano
Copy link
Contributor

Hi @nderambure,

This issue should have been fixed in WP Core:

#58734 (Duotone filter not reflected on the frontend) – WordPress Trac

However, the code modified in the core is not backported to the Gutenberg plugin. Therefore, if you have the Gutenberg plugin enabled, I think this issue will reoccur.

I have submitted #54778 to also fix the issue with the Gutenberg plugin.

@nderambure
Copy link

nderambure commented Nov 15, 2023

Thx @t-hamano !

@t-hamano
Copy link
Contributor

@nderambure

Thanks for the reply. This issue will still persist with the Gutenberg plugin enabled unless #54778 is merged. Therefore, I will leave this issue open.

@github-project-automation github-project-automation bot moved this from Punted to 6.5 to Done in WordPress 6.4 Editor Tasks Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Colors Color management [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants