Make WordPress Core

Opened 2 months ago

Closed 2 months ago

Last modified 4 weeks ago

#60536 closed defect (bug) (fixed)

Installing Google font error - No font faces were installed.

Reported by: kafleg's profile kafleg Owned by: hellofromtonya's profile hellofromTonya
Milestone: 6.5 Priority: normal
Severity: critical Version: 6.5
Component: Editor Keywords: gutenberg-merge has-patch commit has-screenshots
Focuses: Cc:

Description

While checking WordPress 6.5 Beta 1 and testing Google font installation, fonts are not installed.

Finding the issue and discussion can be found here in Slack, https://wordpress.slack.com/archives/C02RQBWTW/p1707883378714549

Solution Found:

Change the number on these two lines from 80100 to 80112 and see if you can install the fonts.

This worked for me.

Attachments (3)

Screen Recording on 2024-02-14 at 12_06_19.mp4 (847.4 KB) - added by kafleg 2 months ago.
font installtion issue.png (125.2 KB) - added by krupajnanda 8 weeks ago.
after installtion.jpg (101.9 KB) - added by krupajnanda 8 weeks ago.

Download all attachments as: .zip

Change History (12)

#2 @costdev
2 months ago

  • Component changed from General to Editor
  • Keywords gutenberg-merge added; 2nd-opinion removed
  • Milestone changed from Awaiting Review to 6.5

Even though this issue has been reported upstream, let's keep this ticket open for now to track an incoming fix from the Gutenberg repository when it's ready.

#3 @costdev
2 months ago

Introduced in [57539]/#59166.

Last edited 2 months ago by costdev (previous) (diff)

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


2 months ago
#4

  • Keywords has-patch added

Fixes a bug where fonts could not be installed in PHP 8.1.0 through 8.1.11 due to incorrect MIME type assignment.

While WP_Font_Utils::get_allowed_font_mime_types() conditionally sets the MIME type for woff and woff2, it incorrectly checks against PHP 8.1.0. The MIME type change did not occur until PHP 8.1.12.

References:

Co-authored-by: costdev <costdev@…>

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

#5 @hellofromTonya
2 months ago

  • Keywords commit added
  • Owner set to hellofromTonya
  • Status changed from new to reviewing

The fix has been merged into Gutenberg's trunk.

PR 6110 is the patch that brings the fix into Core.

#6 @hellofromTonya
2 months ago

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

Committed via changeset [57632]:

Editor: Check PHP 8.1.12 for woff/woff2 mime types in WP_Font_Utils.

Fixes a bug where fonts could not be installed in PHP 8.1.0 through 8.1.11 due to incorrect MIME type assignment.

While WP_Font_Utils::get_allowed_font_mime_types() conditionally sets the MIME type for woff and woff2, it incorrectly checks against PHP 8.1.0. The MIME type change did not occur until PHP 8.1.12.

References:

Follow-up to [57539].

Props costdev, kafleg, hellofromTonya.
Fixes #60536.

Last edited 2 months ago by hellofromTonya (previous) (diff)

#9 @krupajnanda
8 weeks ago

  • Keywords has-screenshots added

Hi @kafleg ,

Today, I verified the issue with with beta 2 release.

After uploading the font in .ttf format I am getting the errors as mentioned below.

No font faces were installed. Fetch error: <p>There has been a critical error on this website.</p><p><a href="https://wordpress.org/documentation/article/faq-troubleshooting/">Learn more about troubleshooting WordPress.</a></p>

Now, when I navigate back to the library within the same opened container I see that font is shown. Please refer to the visual and screenshot attached.

Kindly point me in the right direction if am I following the wrong steps to verify the bug fix.

Here is my test report as stated below.

Test Report

Description

This report validates whether the indicated fix does not work as expected.

Patch tested: REPLACE_WITH_PATCH_URL

Environment

  • WordPress: 6.5-beta2
  • PHP: 8.0.30-dev
  • Server: PHP.wasm
  • Database: WP_SQLite_Translator (Server: 5.5 / Client: 3.40.1)
  • Browser: Chrome 121.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Four 1.0
  • MU Plugins:
    • 0-playground.php
    • 0-sqlite.php
    • WordPress WXZ Exporter 0.1
  • Plugins:
    • Create Block Theme 1.13.8
    • Debug Bar 1.1.4
    • Health Check & Troubleshooting 1.7.0
    • Test Reports 1.1.0
    • User Switching 1.7.3
    • WordPress Importer Git loader 0.8.2

Actual Results

I am getting the errors as explained above and shown in the screencap.

Supplemental Artifacts

Add as Attachment

#10 @kafleg
8 weeks ago

Hello @krupajnanda
Thank you for testing and reporting the bug.

I'll asko try to replicate the issue.

Note: See TracTickets for help on using tickets.