• Resolved John

    (@jhob)


    When viewing the Email Log page in Post SMTP plugin, it fails with a fatal error if the Dotdigital WordPress plugin is active:

    [Mon May 13 12:52:28.739677 2024] [proxy_fcgi:error] [pid 2266732] [client 91.194.74.33:50976] AH01071: Got error 'PHP message: 
    PHP Fatal error: Uncaught TypeError: ltrim(): Argument #1 ($string) must be of type string, array given in /public_html/wp-includes/formatting.php:4494
    Stack trace:
    #0 /public_html/wp-includes/formatting.php(4494): ltrim()
    #1 /public_html/wp-includes/formatting.php(4620): esc_url()
    #2 /public_html/wp-includes/formatting.php(4602): sanitize_url()
    #3 /public_html/wp-content/plugins/dotmailer-sign-up-widget/admin/page/tab/class-dotdigital-wordpress-datafields-admin.php(243): esc_url_raw()
    #4 /public_html/wp-content/plugins/dotmailer-sign-up-widget/admin/page/tab/class-dotdigital-wordpress-datafields-admin.php(54): Dotdigital_WordPress\Admin\Page…', referer: https://mywebsite.com/wp-admin/admin.php?page=postman_email_log

    This seems like a bug with the DotDigital plugin as when it is deactivated the email log can be viewed fine.

    I’ve not looked at the plugin code but it seems that conditions for the hook/action to run in the DotDigital plugin are not sufficiently restrictive as it should probably not be running on this page.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Dotdigital

    (@dotmailer)

    Hi John – I guess in your Post SMTP plugin, $_GET['order'] is set (for handling some request)? You’re right, we can improve on this for sure. Will report back with an ETA.

    Thread Starter John

    (@jhob)

    I just had a look and it does use $_GET[‘order’].

    It displays a log of emails sent by wordpress.

    The emails are requested via ajax:

    /wp-admin/admin-ajax.php?action=ps-get-email-logs&security=7bcf58ff75&draw=1&columns%5B0%5D%5Bdata%5D=id&columns%5B0%5D%5Bname%5D=&columns%5B0%5D%5Bsearchable%5D=true&columns%5B0%5D%5Borderable%5D=false&columns%5B0%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B0%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B1%5D%5Bdata%5D=original_subject&columns%5B1%5D%5Bname%5D=&columns%5B1%5D%5Bsearchable%5D=true&columns%5B1%5D%5Borderable%5D=true&columns%5B1%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B1%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B2%5D%5Bdata%5D=to_header&columns%5B2%5D%5Bname%5D=&columns%5B2%5D%5Bsearchable%5D=true&columns%5B2%5D%5Borderable%5D=true&columns%5B2%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B2%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B3%5D%5Bdata%5D=time&columns%5B3%5D%5Bname%5D=&columns%5B3%5D%5Bsearchable%5D=true&columns%5B3%5D%5Borderable%5D=true&columns%5B3%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B3%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B4%5D%5Bdata%5D=success&columns%5B4%5D%5Bname%5D=&columns%5B4%5D%5Bsearchable%5D=true&columns%5B4%5D%5Borderable%5D=true&columns%5B4%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B4%5D%5Bsearch%5D%5Bregex%5D=false&columns%5B5%5D%5Bdata%5D=actions&columns%5B5%5D%5Bname%5D=&columns%5B5%5D%5Bsearchable%5D=true&columns%5B5%5D%5Borderable%5D=false&columns%5B5%5D%5Bsearch%5D%5Bvalue%5D=&columns%5B5%5D%5Bsearch%5D%5Bregex%5D=false&order%5B0%5D%5Bcolumn%5D=3&order%5B0%5D%5Bdir%5D=desc&start=0&length=25&search%5Bvalue%5D=&search%5Bregex%5D=false&_=1715610458487

    The order parameter is expected as:

    order[0][column] = 3
    order[0][dir] = 'desc'

    This is the plugin in question: https://www.ads-software.com/plugins/post-smtp/ , one of the more popular choices for sending transaction email via SMTP.

    If you could work on a fix that would be great.

    Many thanks.

    Plugin Author Dotdigital

    (@dotmailer)

    @jhob This should be resolved in our new v7.2.1, if you could have a run through that would be great. Thanks for your feedback!

    Thread Starter John

    (@jhob)

    @dotmailer Yep, looks like the update has fixed the issue, many thanks!

    John

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fatal Error with Post SMTP plugin’ is closed to new replies.