#62633 closed defect (bug) (fixed)
Is writable check for fonts folder is misleading/wrong
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | 6.5 |
Component: | Site Health | Keywords: | has-patch has-screenshots has-test-info commit |
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)
Change History (18)
#2
@
7 months 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
This ticket was mentioned in PR #7933 on WordPress/wordpress-develop by @sainathpoojary.
7 months 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 inclass-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
### After fix:
Without Font directory
With Font directory
Trac ticket: #62633
#4
@
7 months 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
@
7 months 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
- ✅ Issue resolved with patch.
Supplemental Artifacts
Before Patch
After patch
#6
@
7 months 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
- ✅ Error condition occurs (reproduced).
Additional Notes
- Any additional details worth mentioning.
Supplemental Artifacts
#7
@
7 months 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
- ✅ Issue resolved with patch.
Supplemental Artifacts
#8
@
4 months ago
Hey @sainathpoojary, thanks for the PR!
Just one thing: $is_fonts_dir_exist
sounds a little bit wrong for me. I am not a native speaker, but $is_writable_fonts_dir
sounds like an English sentence and $is_fonts_dir_exist
does not.
Maybe just $fonts_dir_exists
following the common naming convention?
@SergeyBiryukov There was one check failing, but I don't think this is in relation to the patch. Is this a known issue?
https://github.com/WordPress/wordpress-develop/pull/7933/commits/7f297db89e32fe5e12cca88468c1d549d5855722
#9
@
4 months ago
Thanks for the feedback, @zodiac1978! I’ve updated the variable name to $fonts_dir_exists
, Also all the checks are now passing. Please take a look whenever you have a moment.
#10
@
4 months ago
@sainathpoojary It looks like you have changed the wrong line.
$is_fonts_dir_exist
should be $fonts_dir_exists
#11
@
4 months ago
Thanks for catching that @zodiac1978! I’ve now corrected the variable rename to $fonts_dir_exists. Let me know if there’s anything else that needs adjusting.
This ticket was mentioned in Slack in #core by zodiac1978. View the logs.
4 months ago
#13
@
4 months ago
- Milestone changed from Awaiting Review to 6.8
- Owner set to audrasjb
- Status changed from new to accepted
@audrasjb commented on PR #7933:
4 months ago
#16
committed in https://core.trac.wordpress.org/changeset/59853
Site Health check showing the fonts directory as not writable (although there are no permission issues)