mathsgrinds
Forum Replies Created
-
Oh but isn’t pi4 64-bit? Anyway, I can see the dev talking about it on the ticket, so looks like a proper fix will happen at some point.
I’ll mark this as resolved ?? I guess…
Thank you so much @henryjanssen, so, for anyone else reading this, the fix for now is to go to wp-admin/includes/class-wp-site-health.php and on line 1947 change ? (int) $available_space to ? $available_space
The error is caused when you have too much free space and converting to an integer causes the overly large number to roll into the negatives. I’ll report it now.
Ah interesting, so, will I leave my code change as is and wait for the next update to fix it? Thanks for confirming, I didn’t even consider too much space being a problem in this day and age! Reminds me of the Broken Sword 1 installation bug. lolz
(My code I posted above is pending approval)
- This reply was modified 1 year, 7 months ago by mathsgrinds.
PS: I also needed to add define(‘WP_CONTENT_DIR’, ‘location of content dir’); into config
I edited the code to show how much free space and it is negative!
(-390381568 bytes) Available disk space is critically low, less than 20 MB available. Proceed with caution, updates may fail.
So my “fix” was to change the code in the function to the following:
if ( $available_space < 0 ) { //$result['description'] = __( "Available disk space is negative, something went wrong. $available_space bytes" ); //$result['status'] = 'recommended'; } elseif ( $available_space < 100 * MB_IN_BYTES ) { $result['description'] = __( 'Available disk space is low, less than 100 MB available.' ); $result['status'] = 'recommended'; } elseif ( $available_space < 20 * MB_IN_BYTES ) { $result['description'] = __( 'Available disk space is critically low, less than 20 MB available. Proceed with caution, updates may fail.' ); $result['status'] = 'critical'; } elseif ( ! $available_space ) { $result['description'] = __( 'Could not determine available disk space for updates.' ); $result['status'] = 'recommended'; }
- This reply was modified 1 year, 7 months ago by mathsgrinds.
- This reply was modified 1 year, 7 months ago by mathsgrinds.
The function producing the error message was recently added to 6.3, see WP_Site_Health::get_test_available_updates_disk_space() | Method | WordPress Developer Resources, so my guess is something is wrong with the function but I’m not sure what. Maybe someone with more PHP and WordPress knowledge can help.
I’m currently on Bullseye with Marida-DB updated to 10.5, so, it might not matter ??
I am self-hosting in a pi4, there is no problem with storage, I have 26 GB free but wordpress “thinks” I only have 20 MB free however I think that is a false warning because I can still do things like upgrade/downgrade etc. Something is causing a misreading. I mean I’m sure it is a misreading because I can plainly see I have 26 GB free. And the error goes when I dowgrade, so something is wrong with 6.3 for me.
So, in case anyone is looking here, I have done a full update to everything (mariadb, php etc) and the problem continues. So, I’m not sure what the problem is. Oh and if anyone is wondering, it was goodlayout LMS that had to be turned off to allow the update to 6.3 to happen (otherwise you’ll be locked out of the site).
Anyone have anything else I can try?
I’m afraid none of those solutions fixed the problem, in the end I just downgraded. I have a feeling it might be related to mariadb but it’s only a guess/hunch
Forum: Plugins
In reply to: [WooCommerce] Woocommerece Fatal Error Won’t ActivateThanks, in the end I found a solution by messing about, I removed woocommerece from the server. The problem continued when I reuploaded the latest version. So I uploaded the second newest version, then set its permission to 755 and I could activate the plugin and update it. I have no idea what part of that process fixed the problem but it worked.
Out of interest I did a search of the plugin folder using grep and could not find any “catcl”
cool, thanks for narrowing it down ??