Make WordPress Core

Opened 6 weeks ago

Last modified 6 weeks ago

#62633 new defect (bug)

Is writable check for fonts folder is misleading/wrong

Reported by: zodiac1978's profile zodiac1978 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.5
Component: Site Health Keywords: has-patch has-screenshots has-testing-info
Focuses: Cc:

Description

If no font library is used, the check for folders permissions in Site Health is returning “not writable” for the fonts directory because it does not exist.

I think this is misleading. Maybe it could be created and would be writable then, but it is just not there at the moment.

Attachments (1)

Bildschirmfoto 2024-11-26 um 15.07.35.png (226.3 KB) - added by zodiac1978 6 weeks ago.
Site Health check showing the fonts directory as not writable (although there are no permission issues)

Download all attachments as: .zip

Change History (8)

@zodiac1978
6 weeks ago

Site Health check showing the fonts directory as not writable (although there are no permission issues)

#1 @samiamnot
6 weeks ago

Introduced with #60719 (version 6.6 would be correct, but does not seem available as an option). #61638 is somewhat related.

#2 @sainathpoojary
6 weeks ago

Reproduction Report

Description

This report validates whether the issue can be reproduced.

Environment

  • WordPress: 6.8-alpha-59274-src
  • PHP: 8.2.26
  • Server: nginx/1.27.3
  • Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.2.26)
  • Browser: Chrome 131.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.0
  • MU Plugins: None activated
  • Plugins: Test Reports 1.2.0

Actual Results

✅ Error condition occurs.

Supplemental Artifacts

https://utfs.io/f/PL8E4NiPUWyOKJRJs2YmLeRwrnj39TqHcCJ7Kk0pPsmyaZFi

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


6 weeks ago
#3

  • Keywords has-patch added; needs-patch removed

This PR enhances the filesystem checks in the Site Health debug data by addressing the following:

#### 1. Existence Check

  • Before checking if the fonts directory is writable, it first verifies whether the directory exists.

#### 2. Improved Messaging

  • If the fonts directory does not exist, the debug output now reflects this scenario as "Does not exist".
  • If the directory exists, it shows whether it is writable or not.

### Changes Made

  • Updated the get_wp_filesystem() method in class-wp-debug-data.php.
  • Added a directory existence check (file_exists) for the fonts directory (wp_get_font_dir()['basedir']).
  • Adjusted the debug data output to handle cases where the fonts directory does not exist.

### Before fix:
Without Font directory

https://github.com/user-attachments/assets/44a3dae9-b07c-4c7e-9b78-15432d0a917b

### After fix:

Without Font directory

https://github.com/user-attachments/assets/9943a774-c931-45ba-85df-aba06caa10ba

With Font directory

https://github.com/user-attachments/assets/0127b587-96a7-4969-aafe-6a7dee99214e

Trac ticket: #62633

#4 @abcd95
6 weeks ago

Test Report

Description

This report validates the indicated patch works as expected.

Environment

  • WordPress: 6.7.1
  • PHP: 8.1.29
  • Server: nginx/1.16.0
  • Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.29)
  • Browser: Chrome 131.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.0

Actual Results

✅ Issue resolved with patch.

Supplemental Artifacts

Screenshots

Before: https://postimg.cc/cKsy44VW

After: https://postimg.cc/GBY8rzwV

#5 @ankitkumarshah
6 weeks ago

Test Report

Description

This report validates whether the indicated patch works as expected.

Environment

  • WordPress: 6.7.1
  • PHP: 8.1.29
  • Server: nginx/1.16.0
  • Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.29)
  • Browser: Chrome 131.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.0
  • MU Plugins: None activated

Actual Results

  1. ✅ Issue resolved with patch.

Supplemental Artifacts

Before Patch

https://i.postimg.cc/ZJ5Jk41w/image.png

After patch

https://i.postimg.cc/Bv1GVZ7N/image.png

Last edited 6 weeks ago by ankitkumarshah (previous) (diff)

#6 @im3dabasia1
6 weeks ago

  • Keywords has-screenshots added

Reproduction Report

Description

This report validates whether the issue can be reproduced.

Environment

  • WordPress: 6.8-alpha-59274-src
  • PHP: 8.2.25
  • Server: nginx/1.27.2
  • Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.2.25)
  • Browser: Chrome 129.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.0
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. ✅ Error condition occurs (reproduced).

Additional Notes

  • Any additional details worth mentioning.

Supplemental Artifacts

https://i.postimg.cc/13HHC6DD/Screenshot-2024-12-03-at-4-49-36-PM.png

Last edited 6 weeks ago by im3dabasia1 (previous) (diff)

#7 @im3dabasia1
6 weeks ago

  • Keywords has-testing-info added

Test Report

Description

This report validates whether the indicated patch works as expected.

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

Environment

  • WordPress: 6.8-alpha-59274-src
  • PHP: 8.2.25
  • Server: nginx/1.27.2
  • Database: mysqli (Server: 8.0.40 / Client: mysqlnd 8.2.25)
  • Browser: Chrome 129.0.0.0
  • OS: macOS
  • Theme: Twenty Twenty-Five 1.0
  • MU Plugins: None activated
  • Plugins:
    • Test Reports 1.2.0

Actual Results

  1. ✅ Issue resolved with patch.

Supplemental Artifacts

https://i.postimg.cc/cJLcVHc2/Screenshot-2024-12-03-at-4-51-57-PM.png

Note: See TracTickets for help on using tickets.