Uncaught mysqli_sql_exception
-
Have installed Query Monitor, and during WP-Optimize de/activation the following error happens:
Uncaught mysqli_sql_exception: Table '.wp_wpo_404_detector' doesn't exist
in /wp-includes/class-wpdb.php on line 2357
Call stack:
mysqli_query()
wp-includes/class-wpdb.php:2357
wpdb::_do_query()
wp-includes/class-wpdb.php:2271
wpdb::query()
wp-includes/class-wpdb.php:3156
wpdb::get_results()
wp-admin/includes/upgrade.php:2998
dbDelta()
wp-content/plugins/wp-optimize/includes/class-wp-optimize-table-management.php:54
WP_Optimize_Table_Management::create_plugin_tables()
wp-content/plugins/wp-optimize/includes/class-wpo-activation.php:32
WPO_Activation::actions()
wp-includes/class-wp-hook.php:341
WP_Hook::apply_filters()
wp-includes/class-wp-hook.php:365
WP_Hook::do_action()
wp-includes/plugin.php:522
do_action()
wp-admin/includes/plugin.php:703
activate_plugin()
wp-admin/plugins.php:60
The error appears during this prepared sql statement that dbDelta() doesn’t seem to like:
CREATE TABLEwp_wpo_404_detector(
ID int(11) UNSIGNED NOT NULL auto_increment,
urlTEXT NOT NULL,request_timestampBIGINT UNSIGNED NOT NULL,request_countBIGINT UNSIGNED NOT NULL,referrerTEXT NOT NULL,
PRIMARY KEY (ID),
KEYurl_timestamp_referrer(url(75),request_timestamp,referrer(75)),
KEYtimestamp_count(request_timestamp,request_count),
UNIQUE (url(75),request_timestamp,referrer(75))
)GPT suggested this change:
CREATE TABLE wp_wpo_404_detector (
ID int(11) UNSIGNED NOT NULL auto_increment,
url VARCHAR(255) NOT NULL,
request_timestamp BIGINT UNSIGNED NOT NULL,
request_count BIGINT UNSIGNED NOT NULL,
referrer VARCHAR(255) NOT NULL,
PRIMARY KEY (ID),
KEY url_timestamp_referrer (url, request_timestamp, referrer),
KEY timestamp_count (request_timestamp, request_count),
UNIQUE KEY unique_url_ts_ref (url, request_timestamp, referrer)
)
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
You must be logged in to reply to this topic.