Make WordPress Core

Opened 2 months ago

Closed 4 weeks ago

#60528 closed defect (bug) (reported-upstream)

Font Library: first time install fails if /wp-content/fonts isn't created.

Reported by: mmaattiiaass's profile mmaattiiaass Owned by:
Milestone: Priority: normal
Severity: normal Version: 6.5
Component: Editor Keywords: needs-patch
Focuses: Cc:

Description

The first time the user want to install a font via the font library, it fails with this error message:

Some font faces were installed. There were some errors. Fetch error: Unable to create directory wp-content/fonts. Is its parent directory writable by the server?

After the first attempt, the font installation process works as expected.

This happens because the /wp-content/fonts is not created by the time of the first attempt, after the first one it is created and it works as expected. A fix for this probably consists of creating the folder before trying to write in it.

Attachments (2)

Screenshot from 2024-02-13 13-25-09.png (614.2 KB) - added by mmaattiiaass 2 months ago.
2024-03-07_11-03-06.png (23.4 KB) - added by oglekler 5 weeks ago.

Download all attachments as: .zip

Change History (7)

#1 @hellofromTonya
2 months ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 6.5

Issue opened in Gutenberg https://github.com/WordPress/gutenberg/issues/59023. The issue will be diagnosed and resolved there. When ready, the fix and any tests will be resynchronized here with a Core patch.

Moving this Trac ticket into 6.5 for tracking.

This ticket was mentioned in Slack in #core by chaion07. View the logs.


7 weeks ago

#3 @mmaattiiaass
6 weeks ago

I've been trying to reproduce this issue but I couldn't do it. Today, I spent a few hours creating new environments using wordpress-develop env, wp-env, apache running locally, and other platforms like instaWP, and it didn't fail for me. It seems to be very tricky to reproduce. Because of this, I tend to think it is related to a race condition in wp_mkdir_p. Could that be possible?

#4 @oglekler
5 weeks ago

Bug Report

Description

The first upload of fonts creates an error message, even if they were uploaded and the folder was created.

https://core.trac.wordpress.org/raw-attachment/ticket/60528/2024-03-07_11-03-06.png

Environment

  • WordPress: 6.5 RC1
  • PHP: 8.1.9
  • Server: Apache
  • Database: mysqli (Server: 10.8.4-MariaDB / Client: mysqlnd 8.1.9)
  • Browser: Chrome 122.0.0.0
  • OS: Windows 10/11
  • Theme: Twenty Twenty-Four 1.0

#5 @swissspidy
4 weeks ago

  • Milestone 6.5 deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed

Issue opened in Gutenberg https://github.com/WordPress/gutenberg/issues/59023. The issue will be diagnosed and resolved there.

Closing as reported-upstream for now. There hasn't been any progress on the issue, so regardless of resolution it won't be in time for 6.5 anymore.

Note: See TracTickets for help on using tickets.