• Hi

    I have a quite old website and would like to preserve my statistics. But somewhere along the way, some tables seems to have gone lost or failed to get created. So apache drops lines like this to the error_log:

    [Sun May 28 21:43:58.183893 2023] [php7:notice] [pid 2418] [client 185.125.223.32:0] WordPress database error Table 'wpbusene.wp_2_slim_events' doesn't exist for query \n\t\t\tINSERT IGNORE INTO wp_2_slim_events (position, id, dt, notes)\n\t\t\tVALUES ('717,407','68684','1685310238','{\\"id\\":\\"user_pass\\",\\"type\\":\\"mousedown\\",\\"button\\":\\"left\\"}') made by do_action('wp_ajax_nopriv_slimtrack'), WP_Hook->do_action, WP_Hook->apply_filters, wp_slimstat::sli>
    [Sun May 28 21:43:59.827274 2023] [php7:notice] [pid 2390] [client 185.125.223.32:0] WordPress database error Table 'wpbusene.wp_2_slim_events' doesn't exist for query \n\t\t\tINSERT IGNORE INTO wp_2_slim_events (position, id, dt, notes)\n\t\t\tVALUES ('812,446','68684','1685310239','{\\"value\\":\\"Log In\\",\\"id\\":\\"wp-submit\\",\\"type\\":\\"mousedown\\",\\"button\\":\\"left\\"}') made by do_action('wp_ajax_nopriv_slimtrack'), WP_Hook->do_action, WP_Hook->apply_>

    Is there away to create the missing tables or recreate the database without loosing all collected statistics?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor toxicum

    (@toxicum)

    May it be of help for you, here is the table structure I have with latest version 4.8.0. btw: “wp_2” seems to be your configured db-prefix.

    CREATE TABLE wp_2_slim_events (
    event_id int(10) NOT NULL AUTO_INCREMENT,
    type tinyint(3) unsigned DEFAULT 0,
    event_description varchar(64) DEFAULT NULL,
    notes varchar(256) DEFAULT NULL,
    position varchar(32) DEFAULT NULL,
    id int(10) unsigned NOT NULL DEFAULT 0,
    dt int(10) unsigned DEFAULT 0,
    PRIMARY KEY (event_id),
    KEY vansp_slim_stat_events_idx (dt),
    KEY fk_vansp_slim_events_id (id),
    CONSTRAINT fk_vansp_slim_events_id FOREIGN KEY (id) REFERENCES vansp_slim_stats (id) ON DELETE CASCADE ON UPDATE CASCADE
    ) ENGINE=InnoDB AUTO_INCREMENT=1003 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;

    • This reply was modified 1 year, 6 months ago by toxicum.
    Plugin Contributor toxicum

    (@toxicum)

    So your Slimstat version must be very old, because this table was added with version 4.3.7 more than 7 years ago.
    See https://github.com/wp-slimstat/wp-slimstat/blame/master/admin/index.php#L386

    This file also holds all other table definitions, so please check them as well.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Database missing table’ is closed to new replies.