Hi all,
This may seem like a stupid question, but I have to ask it.
I am running both a production and a test server. On both servers, all of my users when they subscribe to an allowed node, receive two copies of each notification. Each notification is exactly the same and are sent at the same time.
Just for the sake of troubleshooting I have limited the Messaging mail type to HTML mail, using PHP mailer only.
On my test server I am running the following:
Drupal 6.6
Notifications 6.x-1.0
Messaging 6.x-1.0
CCK 6.x-2.1
FeedAPI 6.x-1.4
Token 6.x-1.11
Any help you could offer would be greatly appreciated.
Gary
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | notifications_content.dualnotifications.patch | 981 bytes | ryan_courtnage |
Comments
Comment #1
ryan_courtnage commentedI can verify that this is happening with DRUPAL-6--1 as of this morning. I'm using Simple Mail as the sending method.
Notifications (cvs tag DRUPAL-6--1)
+Simple Mail
Messaging (cvs tag DRUPAL-6--1)
+Content Notifications
+Notifications Autosubscribe
Comment #2
ryan_courtnage commentedI've figured out what is happening here. 2 events are getting added to notifications_event whenever a comment is made on a node.
notifications_content.module is the culprit, where it implements hook_comment(). hook_comment gets called 3 times, with ops: "validate", "insert", and then "publish". The condition matches true 2 times:
If a user does not have the permission "post comments without approval", then hook_comments is not called with op=publish. Perhaps this is different than the way D5 worked?
Anyways, I think that the condition should only match "update" and "publish" ops. I see no reason it needs to check the user_access for anything. So the above would be:
(do we even need "update"?)
Patch for notifications_content.module is attached.
Comment #3
geverest commentedThanks rcourtna,
I installed the patch on both my test and production servers and everything seems to be working fine now.
Gary
Comment #4
pildwell commentedthanks for good patch!
it works =)
Comment #5
jose reyero commentedOk, applied this one, though this other related thread is still open, #285226: Redefine notifications and node/comment approval workflow
Thanks