Email notifications not sent for new pages (only revisions)
-
We’ve used Revisionary for 18 months over various releases and email notification have always been erratic. Now using Revisionary 1.1.12 & WP 3.9.1 and this issue persists. What is consistent is that notifications are not sent when a new page is created by a Revisor user but they are sent when a user edits an existing page.
Having studied the code the cause of the issue appears to be in admin_rvy.php and is as follows:
function act_impose_pending_rev() is called but the email is never sent because execution stops at this point (before the code to send emails):
if ( empty($this->impose_pending_rev) ) {
return;
}$this->impose_pending_rev is empty and should be set in function flt_pendingrev_post_status().
So what’s happening in flt_pendingrev_post_status()?Eexecution in flt_pendingrev_post_status() is halted by the following code before impose_pending_rev is set:
if ( empty($status_obj) || ( ! $status_obj->public && ! $status_obj->private && ( ‘future’ != $stored_post->post_status ) ) )
return $status;This if statement’s condition is being met because $status_obj is not empty and $status_obj->protected is true (i.e. public and private are both false).
I might be wrong, but it appears that “protected” means a user must be logged in and have edit permissions on the post to view it. So it appears to be valid that our posts are “protected” when pending approval and this shouldn’t prevent notifications being sent.
Why does Revisionary prevent emails being sent when post is protected and could this code be changed to allow emails to be sent?
- The topic ‘Email notifications not sent for new pages (only revisions)’ is closed to new replies.