File System Operation Exception
-
Since upgrading to wordpres 5.8 and the latest version of W3 cache (v 2.1.8) were getting a fatal error of Util_WpFile_FilesystemOperationException. It was previously working with older versions of wordpress and the plugin.
Server is running php 7.2, has there been anything significant changed in the latest version of the plugin? Or can anyone shed any light on what’s causing this?
-
Same here. This is what I’m seeing in the logs if it helps:
[Wed Sep 08 09:16:15.817578 2021] [php7:error] [pid 59] [client XXX] PHP Fatal error: Uncaught W3TC\\Util_WpFile_FilesystemOperationException in /var/www/html/wp-content/plugins/w3-total-cache/Util_WpFile.php:242\nStack trace:\n#0 /var/www/html/wp-content/plugins/w3-total-cache/Generic_Environment.php(19): W3TC\\Util_WpFile::file_exists()\n#1 /var/www/html/wp-content/plugins/w3-total-cache/Root_Environment.php(28): W3TC\\Generic_Environment->fix_on_wpadmin_request()\n#2 /var/www/html/wp-content/plugins/w3-total-cache/Generic_Plugin_Admin.php(742): W3TC\\Root_Environment->fix_in_wpadmin()\n#3 /var/www/html/wp-includes/class-wp-hook.php(303): W3TC\\Generic_Plugin_Admin->admin_notices()\n#4 /var/www/html/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters()\n#5 /var/www/html/wp-includes/plugin.php(470): WP_Hook->do_action()\n#6 /var/www/html/wp-admin/admin-header.php(287): do_action()\n#7 /var/www/html/wp-admin/plugins.php(603): require_once(‘/var/www/html/w…’)\n#8 {main}\n thrown in /var/www/html/wp-content/plugins/w3-total-cache/Util_WpFile.php on line 242
Hi Mark,
Yeah, that’s pretty much what i see in the logs or if turn WP_DEBUG to true. Good to see i’m not the only one that gets it.
Hello @atomicmatt @moppenneer
Thank you for reaching out and I am sorry about the issue you experienced with the latest update.
can you please confirm if you have had a direct filesystem — FTP, SSH2?
Also please let me know if the issue persists if you roll back the plugin to the 2.1.6 version.
Thanks!@vmarko Can confirm if we rollback to 2.1.6 it works fine. Not 100% sure what file system we have but it’s centos on VPS, deployed via ansible/git if that helps? We have to SSH in if we want to change any files etc…
Hello @atomicmatt
Thank you for the information. This is helpful.
We are looking into this and will get back to you as soon as we investigate more.
Thank you for your patience.We don’t have a direct file system.
Hello @moppenneer @atomicmatt
Thank you for the information.
We can confirm the issue with the latest release that is causing this and it’s related to the direct filesystem.
Please keep the plugin on 2.1.6 as this will be fixed in the next patch release that will be out soon.
Thanks!Following up — I see the same error, I have direct (SSH) access to the filesystem.
[10-Sep-2021 18:59:07 UTC] PHP Fatal error: Uncaught W3TC\Util_WpFile_FilesystemOperationException in /mnt/ebs/public_html/localwp/wp-content/plugins/w3-total-cache/Util_WpFile.php:242 Stack trace: #0 /mnt/ebs/public_html/localwp/wp-content/plugins/w3-total-cache/Generic_Environment.php(19): W3TC\Util_WpFile::file_exists('/mnt/ebs/public...') #1 /mnt/ebs/public_html/localwp/wp-content/plugins/w3-total-cache/Root_Environment.php(28): W3TC\Generic_Environment->fix_on_wpadmin_request(Object(W3TC\Config), false) #2 /mnt/ebs/public_html/localwp/wp-content/plugins/w3-total-cache/Generic_Plugin_Admin.php(742): W3TC\Root_Environment->fix_in_wpadmin(Object(W3TC\Config)) #3 /mnt/ebs/public_html/localwp/wp-includes/class-wp-hook.php(303): W3TC\Generic_Plugin_Admin->admin_notices('') #4 /mnt/ebs/public_html/localwp/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(false, Array) #5 /mnt/ebs/public_html/localwp/wp-includes/plugin.php(470): WP_Hook->do_action(Array) #6 /mnt/ebs/public_html/localwp/wp-admin/admin-header.php(273): do_action('network_admin_n... in /mnt/ebs/public_html/localwp/wp-content/plugins/w3-total-cache/Util_WpFile.php on line 242noting also we’re on PHP 7.2 and CentOS. All worked fine previous to this release.
Hello @wmgtam
Thank you for the information.
We are working on a fix for this so please keep the plugin on the 2.1.6 version if you are experiencing the issue.
Thanks!Hello @atomicmatt @moppenneer @wmgtam
Thank you for your patience.
While we are working on a release there is a quick fix for the “uncaught exception”In file Generic_Environment.php line 19 change
if ( Util_WpFile::file_exists( Util_Environment::site_path() . 'robots.txt' ) ) {to
if ( file_exists( Util_Environment::site_path() . 'robots.txt' ) ) {Also if anyone intends to toggle the “robots blocking” setting off or deactivate the plugin you may also need (assuming the same issue occurs with the Util_WpFile::delete_file function)
In file Generic_Environment.php line 280 change
Util_WpFile::delete_file( $robots_path );to
unlink( $robots_path );Once again thank you for your patience and understanding.
Any update on this issue or a fix?
Hello @maxinetz
The issue will be fixed in the upcoming release.
Thanks!
The topic ‘File System Operation Exception’ is closed to new replies.