WordPress.org

Support

Support » Plugins and Hacks » Simple Login Log » [Resolved] MYSQL errors in multisite scenario

[Resolved] MYSQL errors in multisite scenario

  • Hi! I just wanted to point out that there are issues in the way the queries are requested by the plugin.

    I’m using Simple Login Log 0.9.5 with WP Multisite 3.5.1 and my php error logs are recording a lot of issues because the cleaning process of the plugin is trying to clean data in tables that doesn’t exist.

    The plugin is recording logins in table wp_simple_login_log. But the instance in every individual site is trying to clean from the table prefixed with the site ID, which does not exist, like xxxxx.wp_7_simple_login_log.

    These are some examples:

    [14-Feb-2013 18:22:05] Error Table ‘tureslr_wordpress.wp_7_simple_login_log’ doesn’t exist de la base de datos de WordPress para la consulta DELETE FROM wp_7_simple_login_log WHERE time < DATE_SUB(CURDATE(),INTERVAL 365 DAY) realizada por do_action_ref_array, call_user_func_array, SimpleLoginLog->cron, SimpleLoginLog->truncate_log
    [15-Feb-2013 00:00:24] Error Table ‘tureslr_wordpress.wp_4_simple_login_log’ doesn’t exist de la base de datos de WordPress para la consulta DELETE FROM wp_4_simple_login_log WHERE time < DATE_SUB(CURDATE(),INTERVAL 90 DAY) realizada por do_action_ref_array, call_user_func_array, SimpleLoginLog->cron, SimpleLoginLog->truncate_log
    [15-Feb-2013 15:58:33] Error Table ‘tureslr_wordpress.wp_6_simple_login_log’ doesn’t exist de la base de datos de WordPress para la consulta DELETE FROM wp_6_simple_login_log WHERE time < DATE_SUB(CURDATE(),INTERVAL 90 DAY) realizada por do_action_ref_array, call_user_func_array, SimpleLoginLog->cron, SimpleLoginLog->truncate_log
    [15-Feb-2013 16:14:47] Error Table ‘tureslr_wordpress.wp_8_simple_login_log’ doesn’t exist de la base de datos de WordPress para la consulta DELETE FROM wp_8_simple_login_log WHERE time < DATE_SUB(CURDATE(),INTERVAL 10 DAY) realizada por do_action_ref_array, call_user_func_array, SimpleLoginLog->cron, SimpleLoginLog->truncate_log

    You just need to fix the name of the table where the plugin is trying to truncate old data.

    http://wordpress.org/extend/plugins/simple-login-log/

Viewing 8 replies - 1 through 8 (of 8 total)
  • @marcelo are you still seeing this issue in the latest version?

    we also run multisite and have not seen this…

    Thanks!
    Dan

    Yes, I still have these issues.

    Please notice that this issue occurs onlly in websites where you checked the option “Truncate Log Entries” of this plugin.
    The only way to make this issue dissappear is to uncheck the “Truncate Log Entries” option.

    [23-Apr-2013 16:50:12 UTC] Error Table 'tureslr_wordpress.wp_8_simple_login_log' doesn't exist de la base de datos de WordPress para la consulta DELETE FROM wp_8_simple_login_log WHERE time < DATE_SUB(CURDATE(),INTERVAL 10 DAY) realizada por do_action_ref_array, call_user_func_array, SimpleLoginLog->cron, SimpleLoginLog->truncate_log
    [23-Apr-2013 18:03:17 UTC] Error Table 'tureslr_wordpress.wp_7_simple_login_log' doesn't exist de la base de datos de WordPress para la consulta DELETE FROM wp_7_simple_login_log WHERE time < DATE_SUB(CURDATE(),INTERVAL 365 DAY) realizada por do_action_ref_array, call_user_func_array, SimpleLoginLog->cron, SimpleLoginLog->truncate_log
    [24-Apr-2013 01:55:41 UTC] Error Table 'tureslr_wordpress.wp_4_simple_login_log' doesn't exist de la base de datos de WordPress para la consulta DELETE FROM wp_4_simple_login_log WHERE time < DATE_SUB(CURDATE(),INTERVAL 90 DAY) realizada por do_action_ref_array, call_user_func_array, SimpleLoginLog->cron, SimpleLoginLog->truncate_log
    Plugin Author Max Chirkov

    @maxchirkov

    Ah, I think I know what the problem is.

    Marcelo, can you do me a favor and test this idea out? In simple-login-log.php file find truncate_log() function. There should be this line:

    $table = $wpdb->prefix . 'simple_login_log';

    change it to this:

    $table = $this->table;

    I took a quick look (but don’t have time to test right now), but I think this should work. A corn job is scheduled DAILY, so you might need to wait a day to see it working or not (I don’t know if there is a way to force it to execute manually).

    Let me know how it goes. Thanks!

    @maxchirkov: I’ve done the correction. I’ll let you know how it goes in the next 24 hrs.

    @maxchirkov: Hi there. I’m glad to announce you that the reported issue have been fixed with your suggestion. May you submit this as an official update of this plugin?
    Thanks!

    Plugin Author Max Chirkov

    @maxchirkov

    Glad to hear that, Marcelo! I’ll commit the new changes and release an update shortly. Thanks for helping out!

    Plugin Author Max Chirkov

    @maxchirkov

    The new version 0.9.6 is now available.

    Great. I’ll upgrade my sites.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Resolved] MYSQL errors in multisite scenario’ is closed to new replies.
Skip to toolbar