Skip to content

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

@fmt

Description

@fmt

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions