Thread Starter
Sean
(@sean-h)
Come to think of it, it is something Iβm concerned about. Is it a problem with SG Optimizer, or is it another issue?
Hello @sean-h,
I believe that the error was a sporadic one because I was not able to replicate it on my website. I believe it should not reoccur and there is nothing to worry about.
Still, in case it happens again, please make sure to contact our support team from your SiteGround user area so we can try and replicate it on your website and conduct a detailed investigation about it.
Best Regards,
Daniela Ivanova
Thread Starter
Sean
(@sean-h)
I might just open an official support ticket, but this is quicker, I don’t really have time to sit on chat right now.
It happened again, same error referencing SG Optimizer, when publishing/saving a post. Something about auto purging cache.
The site didn’t seem to crash, a simple page refresh and we could carry on.
Here is the full error that was just emailed to me:
WordPress version 6.3
Active theme: Divi (version 4.22.1)
Current plugin: SiteGround Optimizer (version 7.4.0)
PHP version 8.1.22
Error Details
=============
An error of type E_ERROR was caused in line 503 of the file /home/customer/www/thetastychilli.com/public_html/wp-content/plugins/sg-cachepress/core/File_Cacher/File_Cacher.php. Error message: Uncaught TypeError: array_diff(): Argument #1 ($array) must be of type array, bool given in /home/customer/www/thetastychilli.com/public_html/wp-content/plugins/sg-cachepress/core/File_Cacher/File_Cacher.php:503
Stack trace:
#0 /home/customer/www/thetastychilli.com/public_html/wp-content/plugins/sg-cachepress/core/File_Cacher/File_Cacher.php(503): array_diff(false, Array)
#1 /home/customer/www/thetastychilli.com/public_html/wp-content/plugins/sg-cachepress/core/Supercacher/Supercacher.php(213): SiteGround_Optimizer\File_Cacher\File_Cacher::purge_cache_request('https://www.the...', true)
#2 /home/customer/www/thetastychilli.com/public_html/wp-content/plugins/sg-cachepress/core/Supercacher/Supercacher.php(197): SiteGround_Optimizer\Supercacher\Supercacher::purge_cache_request('https://www.the...')
#3 /home/customer/www/thetastychilli.com/public_html/wp-content/plugins/sg-cachepress/core/Supercacher/Supercacher_Posts.php(221): SiteGround_Optimizer\Supercacher\Supercacher->purge_rest_cache()
#4 /home/customer/www/thetastychilli.com/public_html/wp-content/plugins/sg-cachepress/core/Supercacher/Supercacher_Posts.php(152): SiteGround_Optimizer\Supercacher\Supercacher_Posts->is_post_excluded_from_cache_purge(Object(WP_Post))
#5 /home/customer/www/thetastychilli.com/public_html/wp-includes/class-wp-hook.php(312): SiteGround_Optimizer\Supercacher\Supercacher_Posts->purge_all_post_cache(1280)
#6 /home/customer/www/thetastychilli.com/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array)
#7 /home/customer/www/thetastychilli.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#8 /home/customer/www/thetastychilli.com/public_html/wp-includes/post.php(4751): do_action('save_post', 1280, Object(WP_Post), true)
#9 /home/customer/www/thetastychilli.com/public_html/wp-includes/post.php(4853): wp_insert_post(Array, false, true)
#10 /home/customer/www/thetastychilli.com/public_html/wp-content/plugins/wp-recipe-maker/includes/public/class-wprm-recipe-saver.php(400): wp_update_post(Array)
#11 /home/customer/www/thetastychilli.com/public_html/wp-content/plugins/wp-recipe-maker/includes/public/class-wprm-recipe-saver.php(326): WPRM_Recipe_Saver::update_recipes_in_post(1283, Array)
#12 /home/customer/www/thetastychilli.com/public_html/wp-includes/class-wp-hook.php(310): WPRM_Recipe_Saver::update_recipes_check('')
#13 /home/customer/www/thetastychilli.com/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array)
#14 /home/customer/www/thetastychilli.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#15 /home/customer/www/thetastychilli.com/public_html/wp-admin/admin.php(175): do_action('admin_init')
#16 /home/customer/www/thetastychilli.com/public_html/wp-admin/edit.php(10): require_once('/home/customer/...')
#17 {main}
thrown
Hello @sean-h
We will need more details on how to replicate the problem as it appears sporadic. It seems to be related to the preheat caching under the File-based caching section but in order to investigate the case in more detail we would need a ticket where we can try replicating the problem and see why it occurs.
In the ticket please describe the exact sequence before the post is edited or created as this could help us pinpoint the exact cause.
Best regards,
Georgi Ganchev
Thread Starter
Sean
(@sean-h)
I don’t think I can offer more info in an official ticket than what I’ve already posted.
Thing is, if I knew when it was going to happen I could pay better attention to exactly what I was doing leading up to that moment. On the other hand, when it happens to my partner I have to now ask her to explain to me exactly what she was doing.
But basically, all we are doing is editing posts, in Gutenberg. When we click ‘Update’ or ‘Publish’ we get this error. Only there was/is no real error, yet. The posts are still being published / updated.
I don’t know how else to say this, but over the years I’ve learned to only contact official support only when/if something is outright broken, and I can’t fix it myself.
So far, it has happened once to me and once to my partner. But ok, 3 strikes and I contact official support π
Thank you for the report @sean-h ,
The case was brought to the attention of our developers and as soon as more information is available, we will update your ticket.
Best regards,
Georgi Ganchev
Thread Starter
Sean
(@sean-h)
Hi @georgiganchev,
There was a 3rd error, but oddly, no matter how much I and SG support tried to re-create it, we couldn’t. It’s been days now and no further issues, and we are working several hours a day on the site in question. So we are just picking through the logs, maybe we find something else useful, other than scandir() apparently not being able to find what it was looking for.
With that said, I have to wonder if WordPress itself isn’t maybe being a bit overzealous with its built in fatal error detection and this is actually a non-issue. Computer errors happen all the time, everywhere, but in many cases, the computers are in fact ‘smart’ enough to fix it themselves and move on, like my host server has just done, every time I had this ‘issue’.
So, I think we can mark this issue as resolved, all on its own, from my side at least.