[wp-trac] [WordPress Trac] #61638: Site Health Tool - Directory sizes stuck in loading state in WordPress v6.6 RC3

WordPress Trac noreply at wordpress.org
Mon Jul 15 12:11:54 UTC 2024


#61638: Site Health Tool - Directory sizes stuck in loading state in WordPress v6.6
RC3
--------------------------+-----------------------------------------
 Reporter:  kowsar89      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  6.6
Component:  Site Health   |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  javascript, administration
--------------------------+-----------------------------------------
Changes (by Clorith):

 * version:   => trunk
 * milestone:  Awaiting Review => 6.6


Comment:

 This was introduced with [58299], although ''technically'' it could have
 happened before as well if the circumstances were correct, this is due to
 a logical flaw in when to send an error state back at
 [https://github.com/WordPress/wordpress-
 develop/blob/5b0006ca9b5408aa73b6dc71fb5b3ebf85f497ec/src/wp-
 admin/includes/class-wp-debug-data.php#L1723-L1737 wp-admin/includes
 /class-wp-debug-data.php#L1723-L1737]

 The newly introduced filesize check for the fonts directory looks for a
 `wp-content/uploads/fonts` folder, if this does not exist (which it does
 not by default), it will return an error state of **not available**, and
 with it being the last entry to be checked, it sets `$size_total` as
 `null`; This is also the variable used to determine the overall error
 state of the size function.

 Using the `$size_total` variable for validation later down in the function
 was probably a bad idea, but since WordPress would always generate the
 directories being checked, it never showed up as an issue before the fonts
 directory (which is conditionally generated) was added to the list of
 places to check.

 This should probably be changed to look for a failure of *all* checks, and
 not just the last to be ran.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61638#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list