• Resolved mathieu

    (@mathieu)


    Hi Frank,

    I have a WordPress Multisite and I have enabled debug log to see if there was any broken plugin somewhere. More as maintenance cause everything is working fine.

    I have discovered that for every site that has autoptimize installed there is those lines that appears over and over.

    `[10-Feb-2022 04:00:02 UTC] PHP Warning: touch(): Unable to create file /home/xxxx/public_html/wp-content/uploads/ao_ccss/1/queue.lock because No such file or directory in /home/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeCriticalCSSCron.php on line 80
    [10-Feb-2022 04:00:02 UTC] PHP Warning: file_put_contents(/home/xxxx/public_html/wp-content/uploads/ao_ccss/1/ccss_f9de54ffd480fd16745bbd95a138ede2.css): failed to open stream: No such file or directory in /home/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeCriticalCSSCron.php on line 661
    [10-Feb-2022 04:00:02 UTC] PHP Warning: error_log(/home/xxxx/public_html/wp-content/uploads/ao_ccss/1/queuelog.html): failed to open stream: No such file or directory in /home/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeCriticalCSSCore.php on line 624
    [10-Feb-2022 04:00:02 UTC] PHP Warning: file_put_contents(/home/xxxx/public_html/wp-content/uploads/ao_ccss/1/ccss_aa266198788362b56b0c930bcf4303ee.css): failed to open stream: No such file or directory in /home/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeCriticalCSSCron.php on line 661
    [10-Feb-2022 04:00:02 UTC] PHP Warning: error_log(/home/xxxx/public_html/wp-content/uploads/ao_ccss/1/queuelog.html): failed to open stream: No such file or directory in /home/xxxx/public_html/wp-content/plugins/autoptimize/classes/autoptimizeCriticalCSSCore.php on line 624`

    Folders are not created but then, I have instructed Autoptimize to save files in another folder. (All CSS are there)

    define(‘AUTOPTIMIZE_CACHE_CHILD_DIR’, ‘/fichiers/’);

    I guess I could mkdir the site->id but I want your opinion on this as this seems like a bug you would like to fix.

    Best regards,

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

    (@optimizingmatters)

    uploads/ao_cscss is where critical CSS is saved (and the queue lock/ log files lives) mathieu, so it is not supposed to be in AUTOPTIMIZE_CACHE_CHILD_DIR.

    frank

    Thread Starter mathieu

    (@mathieu)

    True, my autoptimize files are indeed in the AUTOPTIMIZE_CACHE_CHILD_DIR folder and working file but now that I have investigated it a little more It seems like my critical css is just not working.

    I went to the critical CSS tabs of your plugin and the folder did suddenly appears and Criticalcss files started to be created but the now the folder has been deleted again and the errors are creeping back in the log files.

    It seems like a cache flush delete the ?ao_cscss?/site_id/ folders but it’s not creating itselves unless I go to the critical CSS tab.

    I think I have been paying the criticalcss.com website for nothing for a good while.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    I confirm there’s a bug; the AO CCSS dir is only checked/ created from the settings page, I’ll look into a fix for that (more on that later).

    But there is no logic in AO to remove wp-content/uploads/ao_ccss/ except if AO is uninstalled, so the question is what is deleting that folder?

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, I just pushed a fix for the bug on the Github version, would be great if you could download the beta and install & activate it instead of 2.9.5.1 to test? ??

    Thread Starter mathieu

    (@mathieu)

    Hi Frank, thanks for really looking at the issue. Sorry for the delay, I have some family obligations this weekend…

    I installed the beta but it’s fatal errorin’g :

    `2022/02/12 07:57:34 [error] 29869#29869: *8895501 FastCGI sent in stderr: “PHP message: PHP Parse error: syntax error, unexpected ‘?>’ in /home/xx/public_html/wp-content/plugins/autoptimize-beta/classes/autoptimizeCriticalCSSSettings.php on line 125

    As for why the folders get deleted, I agree that it is weird. I am trying to reproduce it. I wonder if it is not a multisite /uploads/ folder thing that auto-delete empty folders.

    Thanks.

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    silly of my, a missing ), fixed in the beta so can you re-try the download/ install/ test dance?

    Thread Starter mathieu

    (@mathieu)

    I have activated it on one of my website and the folder has created itself and there are .css files in it.

    It does seems to work. Do you know when it gonna get push into the main tree so that I don’t have to have two plugins (and also re-enabling auto-update).

    Cheers & Thank you ??

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    no fixed release date for 3.0 I’m afraid, gut feeling says somewhere in March. I do released on the beta channel as well though, so you’ll be notified when you have to upgrade the beta ??

    Thread Starter mathieu

    (@mathieu)

    I think I’ll do that.
    Is it stable enough for prod?

    Also, I have found some other bug in the 404 handler. I have posted it in your github.

    I guess it is a better place to post that kind of stuff than here?

    Cheers,

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    Is it stable enough for prod?

    I use it on my small-time PROD sites and I test before pushing out a new version, but obviously it should be considered less stable then the www.remarpro.com version. the choice is entirely up to you ??

    Also, I have found some other bug in the 404 handler. I have posted it in your github. I guess it is a better place to post that kind of stuff than here?

    preferably yes ?? PR’s are always seriously considered by the way ??

    Halo anyone can help me… i have some error log like this…

    [STDERR] PHP Warning: file_put_contents(/home/xxxx/public_html/assets/cache/autoptimize/css/autoptimize_snippet_506d109a99c36087013ca150a18d90e3.css): failed to open stream: No such file or directory in /home/xxxx/public_html/assets/plugins/autoptimize/classes/autoptimizeCache.php on line 121

    how fix this???

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    As per the forum guidelines can you create a new topic for your problems @bayukvj ?

    thank you,
    frank

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Tons of error in log files even if it does seem to work’ is closed to new replies.