#61736 closed defect (bug) (duplicate)
WP Site Health doesn't work if `wp-content/uploads/fonts` directory doesn't exist
Reported by: | jkmassel | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | trunk |
Component: | Site Health | Keywords: | has-testing-info has-patch |
Focuses: | Cc: |
Description
Related to #60719 and https://github.com/WordPress/wordpress-develop/pull/6260.
As noted in https://wordpress.org/support/topic/wordpress-6-6-query-to-directory-sizes-of-wp-site-health-json-returns-500-error/, the API returns a 500 error if wp-content/uploads/fonts
doesn't exist (because it thinks it can't reliably determine the size of the WordPress installation without access to that directory).
We're already checking the overall size of uploads_size
, so IINM we're also double-counting the size of any included fonts.
Attachments (2)
Change History (7)
@
8 weeks ago
After creating the wp-content/uploads/fonts
directory within the docker image the values load immediately
#1
@
8 weeks ago
Before creating wp-content/uploads/fonts
:
curl "http://localhost/wp-json/wp-site-health/v1/directory-sizes" -u 'test@example.com:[redacted]' {"code":"not_available","message":"Directory sizes could not be returned.","data":{"status":500}}
After creating wp-content/uploads/fonts
:
curl "http://localhost/wp-json/wp-site-health/v1/directory-sizes" -u 'test@example.com:[redacted]' {"raw":0,"wordpress_size":{"size":"55.37 MB","debug":"55.37 MB (58060516 bytes)","raw":58060516},"themes_size":{"size":"12.12 MB","debug":"12.12 MB (12706752 bytes)","raw":12706752},"plugins_size":{"size":"395.35 KB","debug":"395.35 KB (404836 bytes)","raw":404836},"uploads_size":{"size":"44.87 MB","debug":"44.87 MB (47044510 bytes)","raw":47044510},"fonts_size":{"size":"0.00 B","debug":"0.00 B (0 bytes)"},"database_size":{"size":"3.34 MB","debug":"3.34 MB (3506176 bytes)","raw":3506176},"total_size":{"size":"116.08 MB","debug":"116.08 MB (121722790 bytes)","raw":121722790}}
#2
@
8 weeks ago
- Keywords has-testing-info added
- Severity changed from normal to major
Hi,
I have also try to replicate the issue and it is showing the same behavior at my end.
Environment
WordPress: 6.6.1
PHP: 8.1.23
Server: nginx/1.16.0
Database: mysqli (Server: 8.0.16 / Client: mysqlnd 8.1.23)
Browser: Chrome 126.0.0.0 (macOS)
Theme: Twenty Nineteen 2.8
Also this is happening because if we are getting 'not available' value for the given variable
$all_sizes['total_size']['debug']
then we are passing status 500 in API response due to which all data related to directory showing 'loading...' while it should show only 'loading...' for only directory which does not has data.
API URL : https://site-url/wp-json/wp-site-health/v1/directory-sizes
This ticket was mentioned in PR #7080 on WordPress/wordpress-develop by @narenin.
8 weeks ago
#3
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/61736
#4
@
8 weeks ago
- Milestone Awaiting Review deleted
- Resolution set to duplicate
- Severity changed from major to normal
- Status changed from new to closed
This is already being tracked in #61638
@peterwilsoncc commented on PR #7080:
5 weeks ago
#5
The earlier PR was merged r58884 / https://github.com/WordPress/wordpress-develop/commit/ac5fdb4660caa95d78867c6615de8e329e0e18f1
Clean install of WordPress (using the latest docker image) – size values never load, web console shows HTTP 500 errors