Bug #11160
closedReturn of duplicate email notifactions for blog comments
Added by Gina Cherry almost 6 years ago. Updated almost 6 years ago.
0%
Related issues
Updated by Boone Gorges almost 6 years ago
- Assignee set to Raymond Hoh
Gina, can you please share links to the content that triggered the duplicate notifications?
Updated by Gina Cherry almost 6 years ago
This has happened with the last several blog comments. Here is the most recent example: https://cetls.bmcc.cuny.edu/blog/2019/01/25/race-racism-teaching/
All of the blog comments from the last few months have been flagged as spam, which I need to release and then approve since comments on this blog are moderated. It would be great if we could also figure out why this is happening. Since I don’t receive email notifications about spam, it means I have to remember to check for comments every day.
Updated by Boone Gorges almost 6 years ago
- Target version set to 1.14.8
Thanks for these additional details, Gina. The spam issue sounds suspicious to me. It suggests that there may be a couple related issues: 1. Unspamming a blog comment double-triggers the notification process, and 2. Spam filters are being overly aggressive for your site. We'll investigate.
Regarding email notifications about spam, the site appears to be configured to send an email to cetls@bmcc.cuny.edu whenever a comment is sent to spam. https://bmcccetls.commons.gc.cuny.edu/wp-admin/options-discussion.php Are you checking the proper inbox? Perhaps those notifications are being sent to spam for some reason?
Updated by Gina Cherry almost 6 years ago
Thanks, Boone. I'm fairly sure that the spam comment notifications are not being sent to email spam. I have not seen these notifications in the email spam for either the CETLS account or my personal account. There have been blog comments in the past that were not sent to spam. In those cases, I received notifications at both the CETLS email and my personal email.
Updated by Raymond Hoh almost 6 years ago
- Related to Bug #10800: Duplicate email notifications on blog comments added
Updated by Raymond Hoh almost 6 years ago
- Category name set to Email Notifications
- Status changed from New to Resolved
I outlined the problem here: https://redmine.gc.cuny.edu/issues/10800#note-8
To summarize, for anonymous blog comments, there are two email actions being fired:
// First save by BP Include Non-Member Comments do_action('wp_ajax_dim-comment'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, wp_ajax_dim_comment, wp_set_comment_status, do_action('wp_set_comment_status'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_blogs_record_nonmember_comment_approved, bp_blogs_record_nonmember_comment, bp_blogs_record_activity, bp_activity_add, BP_Activity_Activity->save, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, ass_group_notification_activity // Second save by BP Group Email Subscription do_action('wp_ajax_dim-comment'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, wp_ajax_dim_comment, wp_set_comment_status, wp_transition_comment_status, do_action('transition_comment_status'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, bp_activity_transition_post_type_comment_status, BP_Activity_Activity->save, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, ass_group_notification_activity
To address the problem, we let the first save through, but then remove the second save from happening.
(Code reference - https://github.com/cuny-academic-commons/cac/commit/7c725e2948b71fed62592004bd7db30c8894bdf9)
My previous attempt at fixing this by blocking duplicate queued items from being recorded from sending appears to only address group digests and not immediate email sendouts.
I have deployed this as a hotfix on production. Gina, please reopen and let me know if you are still experiencing duplicate email notifications after unspamming a comment.
Updated by Raymond Hoh over 5 years ago
- Related to Bug #11313: Overly aggressive spam filters added