andresm53
Forum Replies Created
-
Hey?@patrickposner, you were right. There was an error in the debug log:
[2023-10-31 17:57:38] [class-ss-archive-creation-job.php:375] Error: (1) Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /var/www/wordpress/SiteDirectory/wp-content/themes/SEO/partials/producto-single.php:102Stack trace:#0 /var/www/wordpress/SiteDirectory/wp-includes/template.php(787): require()#1 /var/www/wordpress/SiteDirectory/wp-includes/template.php(720): load_template('/var/www/wordpr…', false, Array)#2 /var/www/wordpress/SiteDirectory/wp-includes/general-template.php(206): locate_template(Array, true, false, Array)#3 /var/www/wordpress/SiteDirectory/wp-content/themes/SEO/single-producto.php(52): get_template_part('partials/produc…')#4 /var/www/wordpress/SiteDirectory/wp-includes/template-loader.php(106): include('/var/www/wordpr…')#5 /var/www/wordpress/SiteDirectory/wp-blog-header.php(19): require_once('/var/www/wordpr…')#6 /var/www/wordpress/SiteDirectory/index.php(17): require('/var/www/wordpr…')#7 {main} thrown in /var/www/wordpress/SiteDirectory/wp-content/themes/SEO/partials/producto-single.php on line 102
[2023-10-31 17:57:38] [class-ss-archive-creation-job.php:315] Status message: [error] Error: (1) Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given in /var/www/wordpress/SiteDirectory/wp-content/themes/SEO/partials/producto-single.php:102Stack trace:#0 /var/www/wordpress/SiteDirectory/wp-includes/template.php(787): require()#1 /var/www/wordpress/SiteDirectory/wp-includes/template.php(720): load_template('/var/www/wordpr…', false, Array)#2 /var/www/wordpress/SiteDirectory/wp-includes/general-template.php(206): locate_template(Array, true, false, Array)#3 /var/www/wordpress/SiteDirectory/wp-content/themes/SEO/single-producto.php(52): get_template_part('partials/produc…')#4 /var/www/wordpress/SiteDirectory/wp-includes/template-loader.php(106): include('/var/www/wordpr…')#5 /var/www/wordpress/SiteDirectory/wp-blog-header.php(19): require_once('/var/www/wordpr…')#6 /var/www/wordpress/SiteDirectory/index.php(17): require('/var/www/wordpr…')#7 {main} thrown in /var/www/wordpress/SiteDirectory/wp-content/themes/SEO/partials/producto-single.php on line 102I didn’t see the error before because the debug.txt was being cached and when I clicked it, it was incomplete.
It seems that because of that error, the job was cancelled. I cannot explain the random behavior though. As I mentioned before, sometimes the job completed ok, sometimes got cancelled after 5 minutes. May be the behavior has to do with this function, which seems to cancel the job if there is an error?
Anyways, as soon as I excluded the problematic page, the job started to work consistently.
Note, I have been using Simply Static since version 2.x, and haven’t had to exclude any URL (and I am pretty sure this problematic page had been there ). So it seems that something regarding the error handling changed in 3.x.
Thanks for your help.
Hey @patrickposner, thanks for your answer.
The debug log is the one that I pasted before, in my first post. No errors.
Diagnostic looks fine, everything is green.
After further testing, I have noticed that the behavior is random. Sometimes, the export works just fine; when it does, it takes ~1 hour.
But sometimes, it ends prematurely, after ~5 minutes. In those cases, what I can see is that after the export starts, a WP cron is created, named “wp_archive_creation_job_cron”, which runs every 5 minutes. I suspect that that is the one that ends the export prematurely, for some reason.
You mentioned “that’s usually a problem with either database caching or with WP-Cron”. WP-cron works ok, as far as I can tell. No error in logs related to it. In regard to database caching, we use W3 Total Cache; but for testing purposes, I have disabled it, but that didn’t help to fix this issue.
Since the behavior is random, it’s very hard to troubleshoot. Any other idea is very appreciated.
Thanks!