[wp-trac] [WordPress Trac] #61745: Site health: directory sizes not shown (if font directory doesn't exist?)
WordPress Trac
noreply at wordpress.org
Wed Jul 24 18:10:54 UTC 2024
#61745: Site health: directory sizes not shown (if font directory doesn't exist?)
--------------------------+-----------------------------
Reporter: leedxw | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Site Health | Version: 6.6.1
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
Site health shows
{{{
WordPress directory size Loading…
Uploads directory size Loading…
Themes directory size Loading…
Plugins directory size Loading…
Fonts directory size Loading…
Database size Loading…
Total installation size Loading…
}}}
I can see that `/wp-json/wp-site-health/v1/directory-sizes` returns 500,
but doesn't generate an error log.
{{{
{
"code": "not_available",
"message": "Directory sizes could not be returned.",
"data": {
"status": 500
}
}
}}}
Looking at `wp-includes/rest-api/endpoints/class-wp-rest-site-health-
controller.php` the value of `total_size` is not available, and this means
no other values get reported.
Looking at `wp-admin/includes/class-wp-debug-data.php` if `fonts_size` is
unpopulated, then `total_size` is unpopulated.
`fonts_path` is `wp_get_font_dir()['basedir']` which points at (I assume
the default) `.../wp-content/uploads/fonts` - but this directory doesn't
seem to exist on existing systems.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61745>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list