Database errors showing up in logs #19186
jroysdon
announced in
Developers Community
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Ok, so I’ve been digging, trying to get "Submissions" to load and found this over and over and OVER in the logs:
[17-Jul-2022 22:28:21 UTC] WordPress database error Table 'sosgl_e_events' already exists for query CREATE TABLE
SoSGL_e_events
(id bigint(20) unsigned auto_increment primary key,
event_data text null,
created_at datetime not null
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, Elementor\Frontend->init, Elementor\Plugin->init_common, Elementor\Core\Common\App->init_components, Elementor\Core\Common\Modules\EventTracker\Module->__construct, Elementor\Core\Common\Modules\EventTracker\DB->__construct, Elementor\Core\Common\Modules\EventTracker\DB->create_table
[17-Jul-2022 22:28:22 UTC] WordPress database error Duplicate key name 'created_at_index' for query ALTER TABLE SoSGL_e_events
ADD INDEX
created_at_index
(created_at
)made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), do_action('template_redirect'), WP_Hook->do_action, WP_Hook->apply_filters, Elementor\Frontend->init, Elementor\Plugin->init_common, Elementor\Core\Common\App->init_components, Elementor\Core\Common\Modules\EventTracker\Module->__construct, Elementor\Core\Common\Modules\EventTracker\DB->__construct, Elementor\Core\Common\Modules\EventTracker\DB->add_indexes
In the “initial.php” of the Elementor plugin, there is a call to “createTable” and it throws this error. Now I know a little about IT development (been doing this for nearly 30 years now, just not in WP Plugins). When you create a table, first you check to see if it exists. If it does, you check to see if it is yours (or from another [plug-in] developer). If it is yours, you skip the create and do whatever “maintenance” you want to do (purging old records, etc). If it is not yours, check to see if it uses the same infrastructure that you need. If so, use it. Otherwise, create a new table (like “wp_e_events” + vr) or something like that.
Anyway, it looks like there is ONE of the issues. This happens EVERY time one clicks on “Submissions”.
Beta Was this translation helpful? Give feedback.
All reactions