elementor / static-html-output

Static HTML Output Plugin for WordPress
https://statichtmloutput.com
The Unlicense
124 stars 33 forks source link

Generating through wp-cli returns SQL error but seems to go through (started at v6.6.19, v6.6.18 seems fine) #171

Open fmt opened 3 years ago

fmt commented 3 years ago

I'm getting this on my test dockered (wordpress:latest) wordrpress with wp-cli 2.4.0 (this started at v6.6.19):

root@ac101810fa8e:/var/www/html# sudo -u www-data wp statichtmloutput generate
Generating file list
Preparing for export
WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 for query INSERT INTO wp_statichtmloutput_crawl_log (url, note, status) VALUES  made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, StaticHTMLOutput\CLI->generate, StaticHTMLOutput\Controller->prepare_for_export, StaticHTMLOutput\Exporter->generateModifiedFileList, StaticHTMLOutput\CrawlLog::addUrls
WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 for query INSERT INTO wp_statichtmloutput_urls (url) VALUES  made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php'), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, StaticHTMLOutput\CLI->generate, StaticHTMLOutput\Controller->prepare_for_export, StaticHTMLOutput\Exporter->generateModifiedFileList, StaticHTMLOutput\CrawlQueue::addUrls
Processing URLs  10 / 10  100% [===============================================================================================================] 0:01 / 0:02
Performing post process actions
Success: Generated static site archive in 0.859665 seconds

Version 6.6.18 doesn't throw any error:

root@ac101810fa8e:/var/www/html# sudo -u www-data wp statichtmloutput generate
Generating file list
Preparing for export
Crawling site  100% [==========================================================================================================================] 0:00 / 0:00
Performing post process actions
Success: Generated static site archive in 0.095023 seconds