Make WordPress Core

Opened 4 months ago

Closed 4 weeks ago

Last modified 3 weeks ago

#63798 closed defect (bug) (fixed)

Twenty Twenty: Latest Posts block – Full post content uses different font in editor vs. front end

Reported by: nidhidhandhukiya's profile nidhidhandhukiya Owned by: westonruter's profile westonruter
Milestone: 6.9 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch commit
Focuses: Cc:

Description

Steps to Reproduce:

  1. Activate the Twenty Twenty theme.
  2. Create or edit a page/post.
  3. Add a Latest Posts block.
  4. In the block settings sidebar, enable Post Content.
  5. Under Content settings, choose Full post (instead of Excerpt).
  6. Compare the font styling of the post content in the editor vs. the published front end view.

Expected Result:
The font styling in the editor should match the font styling on the front end when "Full post" is selected.

Actual Result:
When "Full post" is selected, the editor displays the post content in a different font than the front end. When "Excerpt" is selected, the fonts match between both views.

Attachments (7)

63798.patch (1.2 KB) - added by rishabhwp 4 months ago.
Screenshot 2025-08-26 102719.png (259.6 KB) - added by jobata 3 months ago.
Front-end test screenshot-JO
Screenshot 2025-08-26 103735.png (296.7 KB) - added by jobata 3 months ago.
Back-end test screenshot-JO
2025-08-26_22-51-19.png (103.3 KB) - added by oglekler 3 months ago.
frontend.png (65.9 KB) - added by shailu25 7 weeks ago.
Frontend
before-patch-backend.png (106.8 KB) - added by shailu25 7 weeks ago.
Before Patch Backend
after-patch-backend.png (111.2 KB) - added by shailu25 7 weeks ago.
After Patch Backend

Download all attachments as: .zip

Change History (29)

@rishabhwp
4 months ago

#1 @rishabhwp
4 months ago

Reproduction Report

Description

This report validates whether the issue can be reproduced.

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 138.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty 2.9
  • MU Plugins: None activated
  • Plugins:
    • Micro Email Testing 1.1.0
    • Test Reports 1.2.0

Actual Results

  1. ✅ Error condition occurs (reproduced).

Supplemental Artifacts

Editor

https://i.ibb.co/jPBZYf3r/Screenshot-2025-08-08-at-9-52-16-PM.png

Frontend

https://i.ibb.co/hSTr3Sc/Screenshot-2025-08-08-at-8-47-37-PM.png

#2 @rishabhwp
4 months ago

  • Keywords has-patch added

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


4 months ago
#3

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

Fixes a font styling inconsistency in the Twenty Twenty theme where the Latest Posts block displays post content in different fonts between the editor and frontend when "Full post" content is selected.

I created this PR alongside the patch to make testing and updates easier.

@jobata
3 months ago

Front-end test screenshot-JO

@jobata
3 months ago

Back-end test screenshot-JO

#4 @jobata
3 months ago

Font styles match on front-end match back-end except for pull quotes. Also, Latest Posts block pulls post (itself) that has the Latest Post block.

Last edited 3 months ago by jobata (previous) (diff)

#5 @oglekler
3 months ago

Reproduction Report

Description

This report validates whether the issue can be reproduced.

Environment

  • WordPress: 6.9-alpha-60093-src
  • PHP: 8.2.29
  • Server: nginx/1.29.0
  • Database: mysqli (Server: 8.4.6 / Client: mysqlnd 8.2.29)
  • Browser: Chrome 139.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty 2.9
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. ✅ Error condition occurs (reproduced).

Supplemental Artifacts

#6 @Maia12345
3 months ago

Error condition doesn't occur - fonts match on front-end match back-end. https://ibb.co/Q7McN24Q https://ibb.co/qMW5Qt1B

samykantari commented on PR #9455:


3 months ago
#7

Hello from the contribution day at whodunit,
I tested the PR / it works.

Before
https://github.com/user-attachments/assets/04aa2c62-12c7-4c46-950e-166cf2af3d88

After
https://github.com/user-attachments/assets/c8681701-2b01-43a2-ab92-f132f8d489a0

#8 @audrasjb
3 months ago

  • Milestone changed from Awaiting Review to 6.9

Thanks for testing!
Marking this for 6.9 consideration.

#9 @audrasjb
3 months ago

  • Owner set to audrasjb
  • Status changed from new to accepted

@rishabhwp commented on PR #9455:


3 months ago
#10

Thanks for providing the test report, @samykantari.

#11 @shailu25
7 weeks ago

Test Report

This Report Validates that the indicated patch address the issue.✅

Patch Tested: https://github.com/WordPress/wordpress-develop/pull/9455

Environment:

WordPress - 6.9-alpha-20250813.132127
OS - Windows
Browser - Chrome
Theme: Twenty Twenty
PHP - 7.4.31
Plugin - None

Actual Results:

  • Issue Resolved with Patch ✅

Supplemental Artifacts

  • Attached

@shailu25
7 weeks ago

Frontend

@shailu25
7 weeks ago

Before Patch Backend

@shailu25
7 weeks ago

After Patch Backend

#12 @gulamdastgir04
4 weeks ago

Tested the patch in the WordPress Playground using WordPress 6.9 Beta 2 and PHP 8.3.

Test Report

Description

This report validates whether the indicated patch works as expected.

Patch tested: https://github.com/WordPress/wordpress-develop/pull/9455

Environment

  • WordPress: 6.9-beta2-61117
  • PHP: 8.3.27-dev
  • Server: PHP.wasm
  • Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.40.1)
  • Browser: Chrome 142.0.0.0
  • OS: Linux
  • Theme: Twenty Twenty 2.9
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

✅ Issue resolved with patch.

#13 @sabernhardt
4 weeks ago

#62242 was marked as a duplicate. Add props: viralsampat, sainathpoojary, im3dabasia1

Last edited 4 weeks ago by sabernhardt (previous) (diff)

#14 @sabernhardt
4 weeks ago

  • Keywords changes-requested added

The selector in PR 7819 works without .editor-styles-wrapper. I requested changing to .wp-block-latest-posts__post-full-content p in PR 9455.

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


4 weeks ago
#15

This PR was previously opened here, but since there was no further activity on it, I’ve created a new PR based on the latest trunk, including the changes mentioned in this comment

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

This PR fixes a font styling inconsistency in the Twenty Twenty theme where the Latest Posts block displays post content using different fonts in the editor and the frontend when “Full post” content is selected.

### Testing

As outlined here

#16 @sabernhardt
4 weeks ago

  • Keywords changes-requested removed

#17 @wildworks
4 weeks ago

  • Keywords commit added

@sabernhardt @audrasjb I think we're ready to commit the pull request, but what do you think?

@sabernhardt commented on PR #10468:


4 weeks ago
#18

## Test Report
### Description
This report validates that the indicated patch works as expected.

Patch tested: https://github.com/WordPress/wordpress-develop/pull/10468.diff

### Environment

  • WordPress: 6.9-beta4-61182-src
  • PHP: 8.4.0
  • Server: Apache/2.4.62 (Win64) PHP/8.4.0 mod_fcgid/2.3.10-dev
  • Database: mysqli (Server: 9.1.0 / Client: mysqlnd 8.4.0)
  • Browser: Firefox 144.0
  • OS: Windows 11
  • Theme: Twenty Twenty 2.9
  • Plugins:
    • Test Reports 1.2.0

### Actual Results

  1. ✅ With the patch, paragraphs in the full post content of a Latest Posts block appear in the sans-serif font.

### Supplemental Artifacts
https://github.com/user-attachments/assets/bf3d9876-f53f-4012-9b55-18a414d92b75
https://github.com/user-attachments/assets/97bdaa2f-0c86-4a48-8ef9-1e984c365066
https://github.com/user-attachments/assets/b621b440-9fa6-4472-bab7-012d63a9f7b6
https://github.com/user-attachments/assets/e77bd99b-da16-451a-b6d9-d4faadebb35e

Full screenshots in English:

Persian screenshots:

#19 @sabernhardt
4 weeks ago

  • Owner audrasjb deleted
  • Status changed from accepted to assigned

Jb probably will not be able to commit this before 6.9. I think PR 10468 is ready if someone wants to include it in this release. Otherwise, it can be moved to 7.0.

#20 @westonruter
4 weeks ago

  • Owner set to westonruter
  • Status changed from assigned to reviewing

#21 @westonruter
4 weeks ago

  • Resolution set to fixed
  • Status changed from reviewing to closed

In 61189:

Twenty Twenty: Fix font inconsistency for Latest Posts block in block editor.

This ensures that the font used on the frontend is also used in the block editor.

Props rishabhwp, shailu25, sabernhardt, jobata, gulamdastgir04, oglekler, nidhidhandhukiya, Maia12345, audrasjb.
Fixes #63798.

@sabernhardt commented on PR #9455:


3 weeks ago
#22

@samykantari I added props for your contribution toward r61189. If you connect your GitHub and WordPress profiles, credit should be easier to assign to leprincenoir in the future.

(I also manually added props for viralsampat, sainathpoojary, im3dabasia1, and wildworks.)

Note: See TracTickets for help on using tickets.