• Resolved jfk65

    (@jfk65)


    Yesterday we updated the plugin and today we are unable to add any post on our site. I am going to switch it off until you come up with some solution.

    WordPress 6.7.1 Template: Hot Topix (version 3.3.1) Plugin: WP-Optimize – Clean, Compress, Cache (version 4.0.0) Version PHP: 7.3.33-4+0~20220627.98+debian9~1.gbp40b3e

    =======================

    E_ERROR in line 59 of the file /home/vanessa/web/vanessa.fm/public_html/wp-content/plugins/wp-optimize/includes/helpers/class-wpo-file-system-helper.php. Uncaught TypeError: Return value of WPO_File_System_Helper::write_to_file() must be of the type bool, null returned in /home/vanessa/web/vanessa.fm/public_html/wp-content/plugins/wp-optimize/includes/helpers/class-wpo-file-system-helper.php:59
    Stack trace: 0 /home/vanessa/web/vanessa.fm/public_html/wp-content/plugins/wp-optimize/includes/class-updraft-file-logger.php(137): WPO_File_System_Helper::write_to_file(‘/home/vanessa/w…’, ‘[2025-02-11 08:…’, 8) 1 /home/vanessa/web/vanessa.fm/public_html/wp-content/plugins/wp-optimize/includes/class-updraft-file-logger.php(109): Updraft_File_Logger->log(‘[2025-02-11 08:…’, ‘info’, Array) 2 /home/vanessa/web/vanessa.fm/public_html/wp-content/plugins/wp-optimize/cache/class-wpo-page-cache.php(1643): Updraft_File_Logger->info(‘Cache for URL: …’) 3 /home/vanessa/web/vanessa.fm/public_html/wp-content/plugins/wp-optimize/cache/class-wpo-cache-rules.php(182): WPO_Page_Cache->file_log(‘Cache for URL: …’, 157510) 4 /home/vanessa/web/vanessa.fm/public_html/wp-incl

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support vupdraft

    (@vupdraft)

    Hi,

    It looks like you might have a conflict, can you deactivate your other plugins and see if the issues persists, if it does not, can you reactivate them one by one until you find the offending one?

    Thread Starter jfk65

    (@jfk65)

    Hi, it looks that it is your plugin which is the offending one. We’ve been using it for years. As I wrote, your plugin was updated to 4.0.0 and right after the installation problems arose. I had to deactivate it through FTP as I could not even switch it off on the plugin administration page (the system would then show error). If I could roll back to the previous version, it could be some kind of workaround.

    Plugin Support vupdraft

    (@vupdraft)

    Apologies if this sounds basic but have you tried downloading a fresh copy of the plugin and uploading that. It’s possible that the update did not complete and the plugin is partially updated and missing some key files.

    We have not had any other reports of this so there is something specific about your environment/version of WPO that we need to isolate.

    Thread Starter jfk65

    (@jfk65)

    I followed your advice and downloaded the plugin right from your site. First I overwrote the plugin files through FTP – it didn’t work. The system response was: “The plug-in could not be enabled because it caused a critical error.” So I uninstalled the plugin and installed it again using your zip file. I tried to enable the plugin and unfortunately the system response was still the same. I had to block the plugin from my site. I think a rollback to the earlier version of the plugin could be the remedy.

    Plugin Support vupdraft

    (@vupdraft)

    Have you got your FS_METHOD?set tossh2?

    Plugin Support Kowsar Hossain

    (@kowsar89)

    Hi @jfk65,

    This is Kowsar from the development team. Thanks for sharing the error log.

    1. Could you also share your site’s health information? That would help us diagnose a few things. Here’s how you can do that:
      1. Go to your WordPress dashboard.
      2. Navigate to Tools > Site Health.
      3. Click on the Info tab at the top.
      4. At the bottom of the Info tab, click Copy site info to clipboard.
      5. Paste the copied information into a service like Pastebin and share the link with us here.
    2. As per your error log, the issue is coming from file wp-content/plugins/wp-optimize/includes/helpers/class-wpo-file-system-helper.php on line 59. If you’re comfortable editing PHP files, you can try replacing the following line:
    return $filesystem->put_contents($filename, $data, FS_CHMOD_FILE);

    With this:

    return (bool) $filesystem->put_contents($filename, $data, FS_CHMOD_FILE);

    And let us know if this resolves the issue on your website (and if not, I’d be interested to check for any new entries in the error log). However, proceed only if you are comfortable making this change.

    Note: We refactored our filesystem operations to use WordPress’s native Filesystem API in version 4.0.0. However, this is unlikely to be the root cause – it may be related to the server environment or a conflict.

    Plugin Support Kowsar Hossain

    (@kowsar89)

    @jfk65 We’ve released an update (v4.0.1) which should fix this issue. Kindly check. Thanks

    Thread Starter jfk65

    (@jfk65)

    @kowsar89 Sorry, I was abroad and could not check it. I updated to version 4.01 and the problem vanished. Thank you very much. Now I am going to check how it works.

    • This reply was modified 3 days, 6 hours ago by jfk65.
Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.