• Resolved Brendanw7

    (@brendanw7)


    I am having trouble with the filterPostie.php file using the postie_email_notify_body filter.
    Postie finds the file but seems to stop there (see screenshot).
    Screenshot
    It happens even if I just return $body immediately like below.

    function BW_postie_email_notify_body($body, $postemail, $postid) {
        return $body;
    }
    add_filter('postie_email_notify_body', 'BW_postie_email_notify_body', 10, 3);

    Postie version: 1.8.12
    Wordpress version: 4.5
    I know my wordpress version is low, but I would like to avoid updating at this time if I can. Any help? Thanks.

    • This topic was modified 9 years, 6 months ago by Brendanw7.
Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Wayne Allen

    (@wayneallen-1)

    What is in the filterPostie.php file?

    Thread Starter Brendanw7

    (@brendanw7)

    This is the file contents in their entirety:

    <?php
    function BW_postie_email_notify_body($body, $postemail, $postid) {
        $user_id = get_post_field('post_author', $postid);
        $points = mycred_get_users_cred($user_id);
        if(!empty($points)) {
            return "Congratulations. \nYour content (TITLE) was successfully submitted and is awaiting approval. \nYou have ".$points." total points. \nVisit the link below to start redeeming your points.";
        } else {
            return "Congratulations. \nYour content (TITLE) was successfully submitted and is awaiting approval. \nYou have UNKNOWN total points. \nVisit the link below to start redeeming your points.";
        }
    }
    add_filter('postie_email_notify_body', 'BW_postie_email_notify_body', 10, 3);
    ?>
    Plugin Author Wayne Allen

    (@wayneallen-1)

    You need to look in the logs to see if there is an error happening.

    Thread Starter Brendanw7

    (@brendanw7)

    This is the log after running the script twice:

    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: Starting mail fetch
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: Postie Version: 1.8.12
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: WordPress Version: 4.5
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: PHP Version: 5.5.32
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: OS: Linux vps9377.inmotionhosting.com 2.6.32-042stab113.11 #1 SMP Thu Aug 11 09:41:14 MSK 2016 x86_64
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: POSTIE_DEBUG: On
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: Time: 2016-10-26 15:25:17 GMT
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: Error log: /home/sapien13/public_html/c4cdemo/wp-content/error_logs.txt
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: TMP dir: /tmp/
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: Postie is in /home/sapien13/public_html/c4cdemo/wp-content/plugins/postie/
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: cURL version: 7.38.0
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: Cron: On
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: Alternate Cron: Off
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: wp_content_path: /home/sapien13/public_html/c4cdemo/wp-content
    [26-Oct-2016 15:25:17 US/Central] Postie [debug]: found filterPostie.php in /home/sapien13/public_html/c4cdemo/wp-content
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: Starting mail fetch
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: Postie Version: 1.8.12
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: WordPress Version: 4.5
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: PHP Version: 5.5.32
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: OS: Linux vps9377.inmotionhosting.com 2.6.32-042stab113.11 #1 SMP Thu Aug 11 09:41:14 MSK 2016 x86_64
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: POSTIE_DEBUG: On
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: Time: 2016-10-26 15:25:41 GMT
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: Error log: /home/sapien13/public_html/c4cdemo/wp-content/error_logs.txt
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: TMP dir: /tmp/
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: Postie is in /home/sapien13/public_html/c4cdemo/wp-content/plugins/postie/
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: cURL version: 7.38.0
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: Cron: On
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: Alternate Cron: Off
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: wp_content_path: /home/sapien13/public_html/c4cdemo/wp-content
    [26-Oct-2016 15:25:41 US/Central] Postie [debug]: found filterPostie.php in /home/sapien13/public_html/c4cdemo/wp-content
    • This reply was modified 9 years, 6 months ago by Brendanw7.
    Plugin Author Wayne Allen

    (@wayneallen-1)

    All Postie does after the “found filterPostie.php” message is do an include_once()

    Try adding DebugEcho("end of filterPostie.php"); below add_filter() to see if it gets that far.

    Thread Starter Brendanw7

    (@brendanw7)

    I am not sure what I changed to fix it, but it seems to be working now. Must have been my error somewhere. Thank you for your help!

    Plugin Author Wayne Allen

    (@wayneallen-1)

    Glad to hear you got it working.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Issue with filterPostie.php’ is closed to new replies.