Make WordPress Core

Opened 18 months ago

Last modified 7 months ago

#61562 new defect (bug)

Twenty Twenty-One Theme: Latest post block does not appear selected text color on editor & front end sides.

Reported by: viralsampat's profile viralsampat Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 6.5.5
Component: Bundled Theme Keywords: has-patch has-test-info dev-feedback changes-requested
Focuses: ui, css Cc:

Description

Hello,

I have reviewed "Latest Post" block and found thats its selected text color is not appearing when we trying to change its text color from block settings.

I think that it should be appear when we change text color from block settings.

Also, I have already posted similar issue fro twenty-twenty theme. #61524

Here, I have attached its screenshots:

Thanks,

Attachments (15)

twenty-twenty-one-latest-post-block-editor-side.png (254.0 KB) - added by viralsampat 18 months ago.
Back-end
twenty-twenty-one-latest-post-block-front-end-side.png (166.6 KB) - added by viralsampat 18 months ago.
Front-end
61562.patch (1.6 KB) - added by viralsampat 18 months ago.
I have checked above mentioned issue and I have resolved it and added patch. Also, I have attached screenshot after resolved this issue.
after-resolved-twenty-twenty-one-latest-post-block-editor-side.png (238.4 KB) - added by viralsampat 18 months ago.
After resolved issue Back-end:
after-resolved-twenty-twenty-one-latest-post-block-front-end-side.png (195.2 KB) - added by viralsampat 18 months ago.
After resolved issue front-end:
61562-patch-not-working.mp4 (2.7 MB) - added by shraddhagore 11 months ago.
Screen Recording 2025-02-20 at 11.33.10 AM.mp4 (2.2 MB) - added by viralsampat 11 months ago.
I have rechecked the issue and it still replicate from my end. Here, I have attached its video.
61562.2.patch (2.9 KB) - added by viralsampat 11 months ago.
I have updated my patch. Also, I have resolved the text color not changed when we changed the background color issue.
Edit-Page-“Test-Page”-‹-wp-contribution-2024-25-—-WordPress-02-20-2025_11_51_AM.png (250.3 KB) - added by viralsampat 11 months ago.
Editor-end
Test-Page-–-wp-contribution-2024-25-02-20-2025_12_04_PM.png (165.8 KB) - added by viralsampat 11 months ago.
Front-end:
before-61562.2.mp4 (9.1 MB) - added by shraddhagore 11 months ago.
after-61562.2.mp4 (8.4 MB) - added by shraddhagore 11 months ago.
61562.3.patch (3.1 KB) - added by viralsampat 11 months ago.
I have updated my patch and resolved the issue.
before-61562.3.mp4 (8.5 MB) - added by shraddhagore 11 months ago.
after-61562.3.mp4 (8.6 MB) - added by shraddhagore 11 months ago.

Change History (30)

@viralsampat
18 months ago

I have checked above mentioned issue and I have resolved it and added patch. Also, I have attached screenshot after resolved this issue.

#1 @karmatosed
18 months ago

  • Keywords needs-testing added; dev-feedback removed
  • Milestone changed from Awaiting Review to Future Release

Thank you for this patch. Let's get some testing on this with the look for a future release.

#2 @karmatosed
18 months ago

  • Keywords changes-requested added

I think this will have the same issue that @sabernhardt identified in the other ticket #61524

WordPress 6.4 adds the chosen text color to the link (only), but the rest of the text remains the theme's color selections. When adding support for color controls, the theme's colors still need to apply for users do not select a color. (Replacing a specific color with inherit would change how existing blocks appear.)

Ideally we resolve this here to not also have the problem.

#3 @karmatosed
17 months ago

@viralsampat are you able to work on the changes requested for this? It would be great to see about moving it along.

#4 @shraddhagore
11 months ago

Test Report

Description

This report validates whether the indicated patch works as expected.

Patch tested: https://core.trac.wordpress.org/attachment/ticket/61562/61562.patch

Environment

  • WordPress: 6.8-alpha-59274-src
  • PHP: 8.2.27
  • Server: nginx/1.27.4
  • Database: mysqli (Server: 8.4.4 / Client: mysqlnd 8.2.27)
  • Browser: Chrome 133.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty-One 2.4
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. ❌ Issue is not resolved with 61562 patch.

Additional Notes

  • Hello @viralsampat, I wasn't able to replicate the original issue. However, I did notice that when changing the background colour, the text colour doesn't update. This issue is visible both in the editor and on the site.

Supplemental Artifacts

Video: https://core.trac.wordpress.org/attachment/ticket/61562/61562-patch-not-working.mp4

@viralsampat
11 months ago

I have rechecked the issue and it still replicate from my end. Here, I have attached its video.

@viralsampat
11 months ago

I have updated my patch. Also, I have resolved the text color not changed when we changed the background color issue.

#5 @viralsampat
11 months ago

Hello @shraddhagore

Thank you so much for your feedback.

Test Report

Description


I have checked above mentioned issue from my end I have attached its video.

Issue Video: https://core.trac.wordpress.org/attachment/ticket/61562/Screen%20Recording%202025-02-20%20at%2011.33.10%E2%80%AFAM.mp4


Patch tested: https://core.trac.wordpress.org/attachment/ticket/61562/61562.2.patch


Environment

WordPress: 6.7.2 running
Theme: Twenty Twenty-one, 2.4
Browser: Google Chrome, Version 133.0.6943.98 (Official Build) (arm64)
Device: MacBook Air M1
OS: macOS 15.3.1 (24D70)
Gutenberg plugin: Version Version 20.3.0


Screenshots:

Editor: https://core.trac.wordpress.org/attachment/ticket/61562/Edit-Page-%E2%80%9CTest-Page%E2%80%9D-%E2%80%B9-wp-contribution-2024-25-%E2%80%94-WordPress-02-20-2025_11_51_AM.png

Site: https://core.trac.wordpress.org/attachment/ticket/61562/Test-Page-%E2%80%93-wp-contribution-2024-25-02-20-2025_12_04_PM.png

Thanks,

#6 follow-up: @shraddhagore
11 months ago

Test Report

Description

This report validates whether the indicated patch works as expected.

Patch tested: https://core.trac.wordpress.org/attachment/ticket/61562/61562.2.patch

Environment

  • WordPress: 6.8-alpha-59274-src
  • PHP: 8.2.27
  • Server: nginx/1.27.4
  • Database: mysqli (Server: 8.4.4 / Client: mysqlnd 8.2.27)
  • Browser: Chrome 133.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty-One 2.4
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. The issue is partially resolved with the 61562.2 patch.

Additional Notes

  • Hi @viralsampat, thanks for creating another patch and providing the steps to reproduce the original issue. I’ve tested the new patch, and it appears to have resolved the original issue. However, I noticed that the "Read more/Continue reading" hyperlink's text colour doesn't update as expected on the application of background colour and text colour.
  • Additionally, the discrepancy between the text shown in the editor and on the site regarding the "Read more" hyperlink is a separate issue and not in scope.

Supplemental Artifacts

@viralsampat
11 months ago

I have updated my patch and resolved the issue.

#7 @viralsampat
11 months ago

Hello @shraddhagore

Thank you so much for sharing your feedback.

I have updated my patch based on requirement. So, please review it and share your feedback.

Patch: https://core.trac.wordpress.org/attachment/ticket/61562/61562.3.patch


Environment

WordPress: 6.7.2 running
Theme: Twenty Twenty-one, 2.4
Browser: Google Chrome, Version 133.0.6943.98 (Official Build) (arm64)
Device: MacBook Air M1
OS: macOS 15.3.1 (24D70)
Gutenberg plugin: Version Version 20.3.0


Thanks,

#8 @shraddhagore
11 months ago

Test Report

Description

This report validates whether the indicated patch works as expected.

Patch tested: https://core.trac.wordpress.org/attachment/ticket/61562/61562.3.patch

Environment

  • WordPress: 6.8-alpha-59274-src
  • PHP: 8.2.27
  • Server: nginx/1.27.4
  • Database: mysqli (Server: 8.4.4 / Client: mysqlnd 8.2.27)
  • Browser: Chrome 133.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty-One 2.4
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. ✅ The issue is resolved with the 61562.3 patch.

Additional Notes

Hello @viralsampat, thank you for creating a new patch and addressing the background issue too.

Supplemental Artifacts

#9 in reply to: ↑ 6 @shraddhagore
11 months ago

I have created 62993.

  • Additionally, the discrepancy between the text shown in the editor and on the site regarding the "Read more" hyperlink is a separate issue and not in scope.

#10 @SirLouen
9 months ago

  • Keywords has-testing-info dev-feedback added; changes-requested removed

Combined Reproduction and Patch Testing Report

Description

🟠 This report can't fully validate that the patch is completely adequate.

Patch tested: https://core.trac.wordpress.org/attachment/ticket/61562/61562.3.patch

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.2.28
  • Server: nginx/1.27.5
  • Database: mysqli (Server: 8.4.5 / Client: mysqlnd 8.2.28)
  • Browser: Chrome 135.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty-One 2.5
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Bug Reproduction

  1. Add 2 or 3 posts with a good quantity of dummy content first.
  2. Creating a new post with 2021 theme
  3. Adding the widget Latest Post
  4. Enable all Post Meta (Author Name, Post Date)
  5. Changing Text and Background colors
  6. 🐞 Background and Text changes, but not for Post Meta

Expected Results

  • All content within the block should change color, unless there is another way to do it.

Actual Results

  • ✅ Issue resolved with patch.
  • 🟠 Some elements in the code could be improved

Additional Notes

  • 2021 was the last non-block theme, so it doesn't have global colors, but both are Author and Post are assigned to such.
  • Simply by removing these CSS assignments to such meta elements, the issue is solved
  • Recommendation to @viralsampat: If you use Git and do a PR instead of patches, people could provide you code reviews, instead of having to upload a brand-new patch.

Supplemental Artifacts

  • I'm attaching the new patch that sorts this issue, ready for review
Last edited 9 months ago by SirLouen (previous) (diff)

This ticket was mentioned in PR #8747 on WordPress/wordpress-develop by @SirLouen.


9 months ago
#11

I have simplified the patch provided by @viralsampat

Props to @viralsampat and @shraddhagore for testing and providing videos for bug reproduction.

Trac ticket: https://core.trac.wordpress.org/ticket/61562

#12 @darshitrajyaguru97
8 months ago

Test Report

Patch tested: https://core.trac.wordpress.org/attachment/ticket/61562/61562.3.patch

Environment:

OS: Windows 10
PHP: 8.2.12
WordPress: 6.9-alpha-60093-src
Browser: Chrome
Theme: Twenty Twenty One
Plugins: None activated

Actual Results:

Before patch:
Screen Recording: https://tinyurl.com/23j68w3o

After patch:
Screen Recording: https://tinyurl.com/298d2skf

✅ Patch working well as desired solution

#13 @SirLouen
8 months ago

@darshitrajyaguru97
Thanks for the test report
But there is another more updated patch that needs more testing
Here: https://github.com/WordPress/wordpress-develop/pull/8747.diff
If you have time, give it a go

#14 @wordpressdotorg
8 months ago

  • Keywords has-test-info added; has-testing-info removed

#15 @SirLouen
7 months ago

  • Keywords changes-requested added; needs-testing removed

Related GB70278

Note: See TracTickets for help on using tickets.