• Resolved jmartinm

    (@jmartinm)


    I have installed the plugin but no activity log is recording. No record in unknow, registered, blocked etc…

    On the other hand I miss the sgs_log_events table in my database, i only have the sgs_log_visitors

    Many thanks in advance and regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support kuzmanstoyanov

    (@kuzmanstoyanov)

    Hello @jmartinm

    As you already noticed, the reason why the activity log isn’t displaying the events is due to the absence of the sgs_log_events table.

    You can easily recreate this table by deactivating the plugin and then activating it again.

    Following this, you should ensure that the feature is enabled by navigating to Security Optimizer -> Activity log -> Log Settings.

    It is expected that the plugin will be logging new events after that. 

    Best Regards,?
    Kuzman Stoyanov

    Thread Starter jmartinm

    (@jmartinm)

    Hi again,

    I have deactivated and activated again and also uninstalled the plugin.

    The table still not created.

    May I try manually? Any other reason to not have the table during the installation?

    Thanks in advance

    Plugin Support kuzmanstoyanov

    (@kuzmanstoyanov)

    @jmartinm You can create the table manually by executing the following query in phpMyAdmin:

    CREATE TABLE wp_sgs_log_events (
    id int(11) NOT NULL AUTO_INCREMENT,
    visitor_id int(11) NOT NULL,
    ts int(11) NOT NULL DEFAULT '0',
    activity varchar(255) NOT NULL,
    description varchar(255) NOT NULL,
    ip varchar(55) NOT NULL DEFAULT '127.0.0.1',
    hostname varchar(255) DEFAULT '0',
    code varchar(255) NOT NULL DEFAULT '',
    object_id varchar(255) NOT NULL,
    type varchar(255) NOT NULL,
    action varchar(255) NOT NULL,
    visitor_type varchar(255) NOT NULL,
    PRIMARY KEY (id),
    INDEX log_event_index (visitor_id, ts, activity, id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

    Please, make sure to replace the prefix in “wp_sgs_log_events” with the exact prefix of your MySQL database.

    If you are a SiteGround client, we advise you to open a support ticket in your Client Area. The Technical Support team will investigate if there is a specific reason why the table could not be created automatically.

    Regards,
    Kuzman Stoyanov

    Thread Starter jmartinm

    (@jmartinm)

    Hi,

    Great thanks for the creation query I will try.

    Do you know if is there any log or debug mode where I could check the error or reason to not have the table created?

    I have tried in a laboratory restoring a backup and it is working without problem.

    Thanks and regards,

    • This reply was modified 1 year, 1 month ago by jmartinm.
    Thread Starter jmartinm

    (@jmartinm)

    Hi again,

    I have activated the debug mode:

    Index column size too large. The maximum column size is 767 bytes. for query CREATE TABLE IF NOT EXISTS xxxx_sgs_log_events ( id int(11) NOT NULL AUTO_INCREMENT, visitor_id int(11) NOT NULL, ts int(11) NOT NULL DEFAULT ‘0’, activity varchar(255) NOT NULL, description varchar(255) NOT NULL, ip varchar(55) NOT NULL DEFAULT ‘127.0.0.1’, hostname varchar(255) DEFAULT ‘0’, code varchar(255) NOT NULL DEFAULT ”, object_id varchar(255) NOT NULL, type varchar(255) NOT NULL, action varchar(255) NOT NULL, visitor_type varchar(255) NOT NULL, PRIMARY KEY (id), INDEX log_event_index (visitor_id, ts, activity, id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 made by activate_plugin, do_action(‘activate_sg-security/sg-security.php’), WP_Hook->do_action, WP_Hook->apply_filters, SG_Security\Activator\Activator->activate, SG_Security\Activity_Log\Activity_Log_Helper::create_log_tables, dbDelta

    The rest of the error are relate with tables does not exits

    Thanks and regards

    Plugin Support daniellaivanova

    (@daniellaivanova)

    Hello,

    The Index column size too large. The maximum column size is 767 bytes. for query CREATE TABLE IF NOT EXISTS error is specifically related to the InnoDB storage engine and its limitations on the maximum index length.

    I would recommend you to contact your hosting provider and discuss the issue with them as they should be able to assist and provide more information about it.

    Best Regards,
    Daniela Ivanova

    Thread Starter jmartinm

    (@jmartinm)

    Thanks for the help.

    Best Regards

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Activity Log not register any data’ is closed to new replies.