I know this kind of issue has been brought up many times but there doesn't seem to be any open bug that matches exactly. I'm feeling stuck with this.

We have a few hundred accounts on our D6 site. Some people get duplicate email messages for some posts. Not all posts, not all people. Sometimes we get duplicates for comments. Sometimes related to Ubercart. We use OG but it doesn't seem to be related to how many groups are assigned to a node. It doesn't seem to be related to whether or not someone previewed or edited a message.

We use Drupal mail to send messages.

For a while, it seemed to only be happening for comments and I applied a recent patch which seemed to solve the problem but recently, it is worse with different kinds of content triggering the duplicates.

I'm just not even sure where to start. What kind of information would you need to help debug/solve this problem?

The folks getting the messages are volunteers and are understandably upset that they are sometimes receiving two messages per node.

Any support with this would be awesome.

Comments

bluegray’s picture

I have this problem too. I can never reproduce it though and it seems random, which makes me think it's users double clicking or faulty connections leading to the browsers retrying on submit. I'm trying out the http://drupal.org/project/hide_submit module to see if it helps.

If that is the case, a previous issue I submitted might be related: #1017308: Occasionally notifications_content_disable is ignored and notifications are sent when checked

bluegray’s picture

My issue was caused by a combination of the video_upload module triggering a node update on cron - maybe #802454: Cron is trying to upload non-existing videos [caused by the filefield decoupling] and users double clicking on the submit button. The hide_submit module seems to help for the latter.

tooFATforBUTTer’s picture

Component: Notifications » Custom subscriptions

I am actually having a similar problem. I have narrowed it down (at least I think I have) to notifications triggered by custom subscriptions and notifications triggered elsewhere (i.e. organic groups relations, added comments, etc.). The end users get two e-mails, one that contains custom subscription content, and one that contains the rest. Is there a way to force all notifications being sent at the same time to a given user into the same e-mail?

I did notice some duplicate messages in a few of the e-mails. This only appeared though when the recipient of the e-mail was also the author of the node that's generating the notification (new comment to node, modified node, etc.).

We're using the Custom Subscriptions module that's part of the notifications_extra (Notifications Add-On module) version 6.x-2.0-beta2 with Notifications version 6.x-2.3.

tooFATforBUTTer’s picture

I think I figured it out. In notifications_custom.module, line 212, there is a function called "notifications_custom_account_update". The $subscription variable has no value for $subscription->module. So for the purpose of the site I'm working on, I hard coded that value as:

$subscription->module = 'notifications';

on the line right before:

notifications_save_subscription($subscription);  //Originally line 221

After doing some tests, I discovered that all of the custom subscriptions listed in the notifications table had empty values for the "module" column. I tried manually inserting "notifications_custom" and "notifications" into that column for different users, as well as leaving others blank. The users where it was set to "notifications" got one single e-mail, while the users with empty values and values other than "notifications" got separate e-mails for those respective subscriptions (sid's).

ehanuise’s picture

Same problem here, I'll test #4 and see whether it solves the issue.
thanks for spotting the probable cause!