WordPress.org

Ready to get started?Download WordPress

Forums

cbnet Multi Author Comment Notification
[resolved] no notifications when post author comments (10 posts)

  1. alex.morrison
    Member
    Posted 1 year ago #

    Hey Chip,

    Great plugin. I'm running to one issue however. My scenario: I've got 3 author users on the site, and that's all. It's a closed, private site for the authors to write and communicate to each other.

    The goal is for everyone to receive an email regardless of who comments on what post. Your plugin works for me except for when the post author comments on his own post... no one receives a notification then.

    - Everyone has the "Comment Email Notification" option checked in their user profile.
    - Every user role is checked off in the Discussion menu as well as the first option in the Misc options.

    Thanks in advance!

    http://wordpress.org/extend/plugins/cbnet-multi-author-comment-notification/

  2. Chip Bennett
    Theme Review Admin
    Plugin Author

    Posted 1 year ago #

    Hi Alex,

    Thanks for the kind words!

    The issue you're encountering is an inherent part of the core wp_notify_postauthor() function, here:

    // The comment was left by the author
    if ( $comment->user_id == $post->post_author )
    	return false;

    All the Plugin focuses on is expanding the list of addresses that get emailed when the notification email is sent. In the core function, if the comment is left by the post author, the function returns false, and no email at all is sent.

    But, that's a valid point: non-author recipients would potentially still want to receive notification of comments also left by the post author.

    My concern is that I'm also trying to get the core function revised, such that I can simply use a filter, rather than overwriting the entire pluggable function. But, to make this change, I would still have to override the entire function.

    Let me put some thought into it, to try to come up with the best approach.

  3. alex.morrison
    Member
    Posted 1 year ago #

    Thanks for the quick reply.

    If I comment out that if-then function, will the plugin in send an email to even if the post author comments?

  4. Chip Bennett
    Theme Review Admin
    Plugin Author

    Posted 1 year ago #

    If I comment out that if-then function, will the plugin in send an email to even if the post author comments?

    Yes, it should. You may need to comment out the next conditional as well, if you have issues with comment moderation.

  5. alex.morrison
    Member
    Posted 1 year ago #

    okay, I commented both out. Ran a test, but no emails sent.. :-/

  6. Chip Bennett
    Theme Review Admin
    Plugin Author

    Posted 1 year ago #

    I'll have to look into it some more. Give me a couple days. :)

  7. alex.morrison
    Member
    Posted 1 year ago #

    No problem. Thanks!!

  8. alex.morrison
    Member
    Posted 1 year ago #

    Hey Chip,

    Just following up on this issue. Any progress?

    Thanks in advance!

  9. Petr.Vavro
    Member
    Posted 9 months ago #

    Hi,

    any progress?

    as a quick solution i edited the wp_new_comment function in wp-includes/comment.php
    from:

    if ( get_option('comments_notify') && $commentdata['comment_approved'] && ( ! isset( $commentdata['user_id'] ) || $post->post_author != $commentdata['user_id'] ) )
    	wp_notify_postauthor($comment_ID, isset( $commentdata['comment_type'] ) ? $commentdata['comment_type'] : '' );

    to:

    if ( get_option('comments_notify') && $commentdata['comment_approved'] )
    	wp_notify_postauthor($comment_ID, isset( $commentdata['comment_type'] ) ? $commentdata['comment_type'] : '' );

    as the wp_notify_postauthor function doesn't even get called if the author is the comment poster, so the previously mentioned change by Chip Bennett is not enough..

    so to the two commented ifs from Chip Bennetts answer, you can resolve this by changing the if in the core function as shown.

    i know its really not a good solution (updates of WordPress will delete that), but i'm not familliar with plugins in wordpress, so i'm not sure whether this function is overridable and if i even should consider overriding it..

  10. Chip Bennett
    Theme Review Admin
    Plugin Author

    Posted 9 months ago #

    I've just submitted a bug report for this issue:
    http://core.trac.wordpress.org/ticket/25699

    Closing as "resolved", since the issue is really outside of the control of the Plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.