Viewing 15 replies - 1 through 15 (of 18 total)
  • Hi ilanaguttman,
    which plugin version are you running? This should not happen in version 1.5.0.
    Please provide more detailed information like php version, WordPress version, installed plugins (especially plugins that do something with mails)

    Thread Starter ilanaguttman

    (@ilanaguttman)

    Thanks for the quick response.
    I’m running Version 1.5.
    WordPress 4.2.4
    PHP version 5.5
    Relevant Plugins:
    * Postman SMTP
    * WooCommerce
    * WooChimp
    * WPML suite
    * Wordfence Security
    * ZenCache

    My namespace prefix is wpml_. So I think it’s related to WPML suite. Are you able to disable the plugin on a development, test or staging environment and see if the issue persists?

    Thread Starter ilanaguttman

    (@ilanaguttman)

    I have the site on a development environment that isn’t completely up to date, but when I disable all WPML plugins, I still experience the same issue.

    Thread Starter ilanaguttman

    (@ilanaguttman)

    Just for good measure I tried again after disabling every plugin except a few woo commerce ones and akismet and it still doesn’t work.

    Well that’s strange. It would help a lot if you could identify the plugin that produces this behaviour.
    I experienced similar behaviour with the plugin “Email Manager” – when deleting mails I get to the page “schedules” with a notice “Schedule deleted.”
    I discovered this minutes before you opened this issue – I was not able to find the reason so far but I’m working on this.
    I can’t reproduce this on several production sites with a lot of plugins installed.

    Thread Starter ilanaguttman

    (@ilanaguttman)

    What else do you want me to deactivate? How am I supposed to find the plugin that produces this behavior if I’ve deactivated everything besides WooCommerce?
    I’m not using “email manager”

    Thank you for looking into this.

    Are you a developer? If yes just look into the code, see what sql statements are generated, see if there are any errors that help to find the reason.

    Thread Starter ilanaguttman

    (@ilanaguttman)

    I’m more of a project manager, with some development skills. However I need a bit more guidance here. When you say “just look into the code, see what sql statements are generated” – what code do you mean? Files in the plugin? Somewhere else?
    Even if I can’t figure it out, I need to give my development experts some more specific direction and that would be appreciated.

    Yes I’m talking about the plugin files in wp-content/plugins/wp-mail-logging/.
    For debugging we must change the wp-config.php:

    define('WP_DEBUG', true);
    define('WP_DEBUG_DISPLAY', true);
    define('WP_DEBUG_LOG', true);
    define('SAVEQUERIES', true);

    Now we are able to debug several points:
    First try to reproduce the behaviour and see if there are any errors displayed. If there are no errors try to debug the sql.

    SQL
    There are few sql queries in the plugin. The relevant delete query is in WPML_Email_Log_List.php#L329. We loop over all submitted mail_id’s and delete them. Since SAVEQUERIES is defined all queries are saved to $wpdb->queries, so we can add a debug print to the debug.log (you can find it at wp_content/debug.log (because WP_DEBUG_LOG is defined))

    $wpdb->query( $wpdb->prepare("DELETE FROM $tableName WHERE mail_id = %d", esc_sql($item_id) ), ARRAY_A );
    error_log( print_r( $wpdb->queries, true ) );

    See if the sql is fine.
    The output should be similar to:

    [48] => Array
            (
                [0] => DELETE FROM 'wp_wpml_mails' WHERE 'mail_id' = 74
                [1] => 0.0086419582366943
                [2] => do_action('toplevel_page_wpml_plugin_log'), call_user_func_array, WPML_OptionsManager->LogMenu, Email_Logging_ListTable->prepare_items, Email_Logging_ListTable->process_bulk_action
            )

    Depending on the result of your investigation we can try other things.

    Thread Starter ilanaguttman

    (@ilanaguttman)

    Here is what we found:

    debug log entries:

    [22-Aug-2015 19:04:57 UTC] PHP Notice: Undefined index: in /hsphere/local/home/hanakatova/hanakatova.com/wp-content/plugins/wp-mail-logging/WPML_Email_Log_List.php on line 328

    [22-Aug-2015 19:04:57 UTC] PHP Warning: Invalid argument supplied for foreach() in /hsphere/local/home/hanakatova/hanakatova.com/wp-content/plugins/wp-mail-logging/WPML_Email_Log_List.php on line 328

    It means that $_REQUEST[$name] can’t find such index in array, because $this->_args[‘singular’] is undefined or empty.

    Also in this line https://github.com/No3x/wp-mail-logging/blob/release/1.5.0/WPML_Email_Log_List.php#L343 input type has no name https://screencast.com/t/xxKGN8gjZq

    It seems like the ‘singular’, ‘plural’ and ‘ajax’ are not passed to the super-constructor. But the WordPress shipped WP_List_Table classes support these attributes for sure.
    Do you have another theme installed? Looks like the WP_List_Table class is overwritten somewhere – with one that doesn’t store these attributes.
    What’s your php version?

    Thread Starter ilanaguttman

    (@ilanaguttman)

    In addition to the Parent Theme and Child Theme I’m running I also had Storefront and TwentyThirteen themes installed. I deleted those and tried again and I still can’t delete emails. The only themes I have installed now are the FlatMarket theme and a child theme of that one.

    I’m sorry ilanaguttman, I can’t reproduce this behaviour and since nobody else reported this I must assume that it’s a problem with your WordPress installation or another theme.
    If somebody else reports this we are likely able to find similarities.

    As last chance we could do a screen sharing to do some debug in your environment.

    Thread Starter ilanaguttman

    (@ilanaguttman)

    I’m not running any other themes besides the extremely popular FlatMarket theme and a child of it.
    I’m willing to do screenshare with you to help debug.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Deleting emails’ is closed to new replies.