• Resolved satheeshrajv

    (@satheeshrajv)


    I’m getting the below error continuously many time. I’m having Autooptimize plugin version 2.5.1-beta-3. Please help me to resolve it.

    PHP Warning: file_put_contents(/var/www/html/wp-content/cache/autoptimize/css/autoptimize_a1f8b3c13ec7e6452064bb81172c21c2.css): failed to open stream: No such file or directory in /var/www/html/wp-content/plugins/autoptimize-beta/classes/autoptimizeCache.php on line 111,

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    activate this filter, it _should_ fix this problem;

    add_filter('autoptimize_filter_cache_checkdirs_on_write','__return_true');

    hope this helps,
    frank

    Thread Starter satheeshrajv

    (@satheeshrajv)

    where to add this code?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    safest and easiest way is using the code snippets plugin; https://www.ads-software.com/plugins/code-snippets/

    Thread Starter satheeshrajv

    (@satheeshrajv)

    Sorry, I’m not having that plugin and I’m not allowed to install any plugin. So I kindly request you to provide an alternate way. It will be really good if the code changes are in Autooptimize plugin file.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    well, the only alternative is adding it to your child theme’s functions.php, but take into account theme updates would overwrite your change?

    Hi, I am getting the same error. I’ve activated the snippet, but the issue remains. Is there anything else to do / check?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    afraid not woo-do, this is a very rare and hard to debug & fix issue. does the error also refer to /var/www/html/wp-content/plugins/autoptimize-beta/classes/autoptimizeCache.php on line 111? is your site working normally for you and visitors and is this just a nuisance in the error-log, or are things broken when visiting the site as well? and lastly; on what type of server are you hosted, is the disk a network share maybe?

    Yes it refers to this line also. It appears every now and then. Sometimes the sits CSS is kind of broken on page load. It’s fine when you reload the page. But I am not sure if this is in conjunction with this error. It’s a dedicated server.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    And is the disk a mounted network-share (NFS) maybe?

    FYI: thank you for the filter, I was having the same error code and it fixed my problem. On my site, there was an issue when changing language via the language picker (using the WPML plugin). In firefox and safari the page returned what looked like a large magnifying glass, refresh helped only sporadically. In chrome the page still loaded fine. With all browsers, errors in the log showed:

    failed to open stream: No such file or directory in /home/wp/disk/wordpress/wp-content/plugins/autoptimize/classes/autoptimizeCache.php on line 111PHP message: PHP Warning: file_put_contents(/home/wp/disk/wordpress/wp-content/cache/autoptimize/css/autoptimize_snippet_4bcd30da91948325b2a3583a6c702085.css)

    I added the filter now the errors are gone and the site works properly.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Failed to open stream: No such file or directory’ is closed to new replies.