Support » Plugin: Edit Flow » [Plugin: Edit Flow] Possible bug with Submit for Review notifications

  • I ran into a problem today where notification emails were not being sent when a post status is changed from Draft to Pending Review.

    I created a plugin to auto-assign a user group to all ‘pending’ statuses as shown here:

    That works great. The problem I ran into is the email was never sent to the user group when a new post was set to pending. Here are the steps to reproduce:

    1. Login as a Contributor
    2. Create a brand new post and save as draft
    3. Submit post for Review

    The problem is line 324 in notifications.php $old_status was coming through as ‘pending’, even though the old post status was actually a draft, so the notification trigger didn’t happen.

    I was able to make a workaround using the ef_notification_ignored_statuses filter, but there seems to be a larger issue at play here.

    Let me know if you need anymore details

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Daniel Bachhuber


    Hand Built

    Sorry for the late reply on this. I’ll have time to test and see if I can reproduce tomorrow or this weekend

    Plugin Author Daniel Bachhuber


    Hand Built

    Finally got around to testing this. I’m having trouble reproducing though. I’ve added the following to notifications.php:

    function notification_status_change( $new_status, $old_status, $post ) {
    		global $edit_flow;
    		static $number;
    		error_log( 'number: ' . $number );
    		error_log( 'old status: ' . $old_status );
    		error_log( 'new status: ' . $new_status );

    This is what I see happening:

    [02-Jun-2012 05:13:56] number: 1
    [02-Jun-2012 05:13:56] old status: new
    [02-Jun-2012 05:13:56] new status: inherit
    [02-Jun-2012 05:13:56] number: 2
    [02-Jun-2012 05:13:56] old status: draft
    [02-Jun-2012 05:13:56] new status: pending

    The hook is fired twice obviously, but the first time is ignored because ‘inherit’ is an ignored status. The second time follows what I’d expect.

    Can you share any local modifications you’ve made, and how you’re applying your filters? Also, similar debug output would be useful. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Edit Flow] Possible bug with Submit for Review notifications’ is closed to new replies.