Plugin activation generates WP database errors if table prefix is not “wp_”
-
Hi,
I am experiencing an issue with the uncanny-automator plugin version 6.0. After installing and activating the plugin using WP-CLI, I receive multiple WordPress database errors in the php_errorlog . This issue occurs on a fresh WP install when the WordPress table prefix is set different to “wp_” (for example $table_prefix = ‘ovm_’; ).
Here is the command I used to activate the plugin:
$ wp plugin activate uncanny-automator Plugin 'uncanny-automator' activated. Success: Activated 1 of 1 plugins.However, this results in numerous errors of the following type in the
php_errorlog:[25-Oct-2024 07:36:47 UTC] WordPress database error Table 'db9df9wbodib9i.ovm_uap_options' doesn't exist for query SELECT option_value FROM ovm_uap_options WHERE option_name = 'automator_settings_debug_notices_enabled' LIMIT 1 made by include('/usr/local/wp-cli/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, Plugin_Command->activate, activate_plugin, plugin_sandbox_scrape, include_once('/plugins/uncanny-automator/uncanny-automator.php'), require('/plugins/uncanny-automator/src/globals.php'), automator_get_option
[25-Oct-2024 07:36:47 UTC] WordPress database error Table 'db9df9wbodib9i.ovm_uap_options' doesn't exist for query SELECT option_value FROM ovm_uap_options WHERE option_name = 'load_automator' LIMIT 1 made by include('/usr/local/wp-cli/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, Plugin_Command->activate, activate_plugin, plugin_sandbox_scrape, include_once('/plugins/uncanny-automator/uncanny-automator.php'), require('/plugins/uncanny-automator/src/globals.php'), automator_get_option
...(The full error log contains multiple entries similar to the one above, all referencing the
ovm_uap_optionstable, which doesn’t exist.)Upon investigation, I found that this issue seems to affect every WordPress installation that doesn’t use “wp_” as the table prefix. The plugin appears to be hardcoded to expect this default prefix, which causes issues when a different prefix is used.
For reference, I looked into this file, and it seems the problem is consistent across non-default table prefixes.
Could the developers please look into this issue? It would be great if the plugin could handle custom table prefixes correctly.
Thank you!
The topic ‘Plugin activation generates WP database errors if table prefix is not “wp_”’ is closed to new replies.