Email notification upon new og content intermittent or failing for some subscribers

Rick Ray - January 12, 2007 - 18:55
Project:Organic groups
Version:5.x-7.3
Component:og.module
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

Even when a user has their preferences set to "Always send email notifications" (in account settings > Organic groups settings > Email notifications), some users receive email only intermittently and some not at all. One of these users is one of my own test users, so I can confirm that the email is not going into a junk folder.

I've also confirmed that the og_email field is set to 1 in og_uid_global for the users experiencing this issue.

By contrast, when I use the manual og email tool (the email tab on an og's main page), emails go through to all subscribers just fine.

Is there a log file to see if an attempt was made to send the email? Has anyone else grappled with this issue? Thanks!

#1

jasonwhat - March 1, 2007 - 20:53
Version:4.7.x-1.x-dev» 5.x-1.0

I'm moving this to 5.1 because I'm still seeing the issue. The only way to have notifications work is if the user has the option to "selectively send email notifications..." and then goes to their subscription management page for that group and chooses to receive emails. This is on a 5.1 site that was upgraded from 4.7.

#2

moshe weitzman - March 2, 2007 - 13:41

i'd love for someone to look into this.

#3

walterhoct - March 10, 2007 - 03:06
Version:5.x-1.0» 5.x-2.2

I have fresh install of 5.x-22 as a test site. After setting up groups and when having users post blogs and comments, no email notifications are sent at all. I tried both options of "send" as default and "selectively send...". Neither setting works.

#4

moshe weitzman - March 10, 2007 - 05:05

there is definately a problem here. lets not have people keep reiterating that. we need posts that work for a solution now.

#5

Morbus Iff - March 29, 2007 - 10:50

moshe: After fiddling with $user->og_mail and og.notifications and having no luck, I forced all users to ou.mail_type = 1, and that finally worked. There's nothing in my og_uid_global table. Could you tell me more about ou.mail_type?

#6

moshe weitzman - March 29, 2007 - 14:30

ou.mail is a group specific choice about whether user wants notifications. it is in effect unless user has global notifications enabled or completely disabled. so it can be overridden by the choices in oug.

when oug is null, my mail send query tries to be smart, but likely isn't.

#7

bchoc - April 23, 2007 - 07:53

Here's what I've observered. Hopefully it's helpful.

My user was getting no notifications. I had it set to "Always send email notifications" and it had always been set thus. I looked in the og_uid table and saw that my UID had 3 NIDs, one for each group, and that each mail_type was set to null.

I changed my preference to "Selectively send" and as I turned on notifications for each group, the mail_type for each changed to 1. I created a piece of content and got a notification correctly.

Next, I went back to the profile page and reset to "Never send email notifications" (I did not indivually turn each off). The mail_type stayed at 1, and I created new content and still got an email alert. This lead me to believe that the mail_type is what sets alerts, period, and that the Always/Never overrides are not functioning.

However, what is even more odd is that another user has received correct alerts, and yet is set to "Always" and has mail_type still at null. The only difference is that my user is an admin and hers is not.

I am not a php coder so I can't dig in for you, but hopefully this data helps you get a better picture.

#8

moshe weitzman - May 23, 2007 - 18:59

anyone available to dig into this?

#9

ShutterFreak - June 26, 2007 - 16:43

Found it (I guess):

  • You do get email notifications when a new node is created in the group you are subscribed to.
  • You don't get email notifications when such a node gets updated.

Is this by design?

FWIW I created a SQL query that shows the status of the group users in the database:

mysql> select ou.uid as uid,u.name as name, ou.og_role as role,ou.is_active as active,ou.is_admin as admin,ou.nid as nid, ou.mail_type as m_type, oug.og_email as og_email from og_uid ou inner join users u on ou.uid = u.uid left join og_uid_global oug on ou.uid = oug.uid order by nid, uid;
+-----+------+------+--------+-------+-----+--------+----------+
| uid | name | role | active | admin | nid | m_type | og_email |
+-----+------+------+--------+-------+-----+--------+----------+
|   1 | AAAA |    0 |      1 |     1 |   2 |      1 |        2 |
|   2 | BBBB |    0 |      1 |     1 |   2 |      1 |        2 |
|   3 | CCCC |    0 |      1 |     0 |   2 |      0 |        2 |
|   4 | DDDD |    0 |      1 |     0 |   2 |      0 |        2 |
|   3 | CCCC |    0 |      1 |     1 |   8 |      0 |        2 |
|   4 | DDDD |    0 |      1 |     0 |   8 |      0 |        2 |
+-----+------+------+--------+-------+-----+--------+----------+

Users AAAA and BBBB are admins for the group with nid = 2, and are configured to selectively receive group posts (og_email = 2), and have the group posts enabled for that group (m_type = 1).

If you prefer seeing all groups per user, then you have to change the order clause in that SQL query.

Best regards,

Olivier

#10

moshe weitzman - June 26, 2007 - 17:41

by design, we don't send email upon updates. we can't email everyone when someone changes a typo ... note that there could be other, real problems with email notification.

#11

ShutterFreak - June 26, 2007 - 19:02

Thanks for clearing out this point. I then can only confirm that you need to make sure "Selectively receive group posts" is the default behavior for your groups.

When installing Organic Groups on a Drupal environment that already has users on it, I also came across the behavior that some users did and other users did not receive mail updates on new content in the group. What did the trick was manually updating the database via the MySQL command prompt:

  • Set og_uid_global.og_email to '2' for all groups that should support email notifications.
  • Set og_uid.mail_type to '1' to activate (to '0' to deactivate) the group notifications for all users.

Hope this helps!

#12

Andrupal - August 7, 2007 - 04:05
Version:5.x-2.2» 4.7.x-1.x-dev

I did a crazy hack to the DB field definitions in table "og_uid" using PHPmyadmin, where I set the default field value for 'mail_type' to "not null" and forced a default value of "1" ...this appears to produce the desired results, where new users are subscribed to emails automatically, however may kill the other functionality built into the og_uid_globals table...needs more testing.

#13

ShutterFreak - August 7, 2007 - 13:03

That will do the job, but then you're forcing all members to receive group notifications.

What would be better, is to add a preference in OG to set the default subscription for one individual group (on the group creation page), and a default behavior for all groups (on the OG configuration page), or even for particular group types (if you happen to have defined more than one). When a NULL value is found for og_uid.mail_type, OG then has sufficient knowledge to make the correct decision. This approach also remains backwards compatible with the current OG database scheme.

I am not sure to which version this issue belongs to. It seems to be a "missing feature" across all maintained versions (4.7.x, 5.x, 6.x) now.

#14

Veggieryan - September 19, 2007 - 09:07

wow.
I spent an evening with this an came up with nothing.
I cant believe this bug has not been squashed.
I offer a quick couple hundred dollars via paypal for a fix.
I can help test.

lets get this bug. its so crucial.
thanks!
ryan.

#15

moshe weitzman - September 20, 2007 - 23:22
Version:4.7.x-1.x-dev» HEAD
Status:active» active (needs more info)

I just committed a patch which simplified the og_mail query. that may or may not help with this elusive issue.

I have tagged a new release 5.x-4.0-rc1. you may download it at http://drupal.org/node/177393. please test and report back any troubles. if i don't hear anything in a few days, i'll make another release which is not a release candidate.

#16

alex_b - September 26, 2007 - 17:39

subscribing.

#17

moshe weitzman - September 28, 2007 - 15:49

is anyone able to say if this is bug is fixd or not? use the very latest release i made today - http://drupal.org/node/179410

#18

bsuttis - September 30, 2007 - 04:34

From my limited testing, it appears to work now.

#19

moshe weitzman - October 4, 2007 - 17:10
Status:active (needs more info)» fixed

please reopen if someone still has trouble with a release candidate or og 5.x-4

#20

Anonymous - October 18, 2007 - 17:11
Status:fixed» closed

#21

jashoet - November 6, 2007 - 05:29

Hey let me open this again!

I noticed the notification stopped working on Drupal 5.1, og 5.x-3 (i think)
upgraded now to Drupal 5.3, og 5.x-4.
Still no notification?!

Working on it now. But mystified?

things I have noticed
email to the group works fine (my conclusion is drupal_mail works fine)
also email notifications for:
- new admin
- invite
- new subscription
work fine

for me this narrows the issue down to og_mail

I have noticed a new posting/comment generates a job queue.
On cron the job queue is run
but no mail notification sent to me (I have 3 accounts which should get notified: 1 admin, 1 general user, 1 test user).
From my reckoning job queue runs og_mail, which fails??

like I said working on it

#22

jashoet - November 7, 2007 - 08:21

OK og_mail works fine!

my ISP mail filter works fine too!
figured that out eventually.

#23

Steve Dondley - November 14, 2007 - 14:12

Heads up to those who upgrade. I installed 5.x-4 and thought I was still having the problem. But then I noticed the subscription setting had changed for every user. I set that to always send and it works now. I'm guessing the subscription settings were changed when upgrading the database.

#24

kbpair - November 26, 2007 - 18:10

I am still seeing this issue. I am using Organic Groups 5.x-4.0. I have changed the database to not allow null values for mail_type and a default of 1. I also changed global og_email to 2 for all users. I am still seeing the problem. If I create content and select only one group for the audience and make private (uncheck public) I did see notifications. However if I select the group and leave it public (I also promoted to front page) no notifications.

I then tried to send an email via contact on the user page and also had intermittent results. So I started looking beyond OG.

Finally I changed mime mail configuration (5.x-1.x-dev) so that "Use mime mail for all system messages' was unchecked. The last two tests I have run did send out notifications and contact is sending notifications as well.

I am not confident this fixed the issue, so if anybody else wants to test 'That would be great'.

thanks

#25

wallan - January 31, 2008 - 23:18

I'm having the same problem with og 5.x-5.0 on drupal 5.6. In fact, I only started experiencing it since I recently upgraded from og 5.x-4.0 and from drupal 5.3.

I've changed og_uid_mail_type to 1 and og_uid_global.og_mail to 2, but that hasn't had any effect.

Anybody got any advice?!

Cheers!

[EDIT: Just to be clear about my site's symptoms - as far as I can tell, no emails are being sent out at all for post notifications. They are being sent out when a new group is created, however. It might be that some of my users are getting notifications, but I haven't been able to verify this.]

[EDIT: OK, so it turns out that this wasn't anything to do with organic groups. Sorry if I inconvenienced anyone with this!]

#26

bchoc - January 31, 2008 - 20:09

Upgraded to 5.0 just recently and didn't think much of it, but my boss found out in a big way that the emails started going out! Heh, oops. So it appears to be working for me under OG 5.0 (Drupal 5.5), now.

#27

dugh - August 30, 2008 - 23:30
Version:HEAD» 5.x-7.3

still see the issue

#28

webthingee - September 8, 2008 - 16:18

I have the issue here too

#29

mziegmann - September 9, 2008 - 21:41

Not sure if I'm having the same issue. Using Drupal 6.4 here. I'm finding that new posts are never emailed to any users, regardless of differences in the way their notification settings are set up (whether it's set to "always receive email notifications", or "selectively send" and the right group is enabled for email notifications).

Updates to group posts are always emailed.
Comments and replies to group posts are always emailed.

Would really appreciate help on this!

#30

Veggieryan - September 9, 2008 - 21:43

have you guys tried using the notifications and messaging framework modules to handle the emails? it integrates with OG. probably your best bet.

#31

mziegmann - September 9, 2008 - 22:29

I do have Notifications & Messaging modules enabled, which is what seems to be handling the emails that do send reliably.

I don't see where I can integrate new OG posts in Notifications/Messaging? Can you clarify how I can enable email notification of new node creation to be sent? I appreciate the help.

 
 

Drupal is a registered trademark of Dries Buytaert.