OK it's all set up and it does everything but actually send mail! I need help figuring out why. I've already attempted everything I know how to do: configure it several ways, read the documentation, browse the existing issues... I am stuck.

Here are the facts:
- I'm using the simple mail method
- drupal_mail appears to be working, because other trigger->action pairs do send mail
- Notifications must be set up correctly because when I create a new node, notification records appear in the log
- The emails I want to see are appearing in the message log under "my account"

HOWEVER

When I create a blog entry with devel backtrace error handling turned on, I get a backtrace. Without devel, I recall getting a WSD. Unfortunately the backtrace information isn't very useful.

Anyone run into this before? What do I need to do, to fix it?

Comments

tmetzger’s picture

Just a bit more info. Here's the Krumo backtrace stuff:

It shows me this query:
SELECT s.*, f.* FROM {notifications} s INNER JOIN {notifications_fields} f ON s.sid = f.sid WHERE (s.uid = %d) AND (s.event_type = '%s') AND ((f.field = '%s' AND f.intval = %d) OR (f.field = '%s' AND f.value = '%s') OR (f.field = '%s' AND f.intval = %d))

Apparently called from here:
Called from .../sites/default/modules/notifications/notifications.module, line 650

And line 650 of notifications.module is the one that does this:
// Build the query merging all the parts
list($sql, $args) = notifications_query_sql($query);dsm($sql);dsm($args);

Hope that helps! Really need someone to get me out of this problem!!

I may be just doing something stupid!

Peter Swietoslawski’s picture

Are you by any chance using OG? If so this might help you #439096: Notification for the post targeted to more than one OG group does not get into queue and in this case it's not a Messaging issue but integration between OG and Notifications.

tmetzger’s picture

Hi there. I'm not using OG.

Is there some difference between the way Messaging handles drupal_mail and how other actions use it? Again, other mail is getting sent out, just not the stuff through Notifications/Messaging.

HELP!

tmetzger’s picture

OK I'm nothing if not persistent. :)

The function notifications_user_get_subscriptions is being called with a number in the $object parameter, and ultimately the code in notifications_content_notifications assumes that it can be treated as a node. Consequently when they ask for $node->nid it comes back as null, and likewise for all the other parameters. No wonder the query fails!

What I don't yet know is where that first method gets called from. I don't know who is passing in a number when it should be a node.

Is this a known bug that's been fixed in beta4?

jose reyero’s picture

Status: Active » Closed (fixed)

Ok, so its not a messaging issue. The backtrace may be unrelated, as it was just some left over debug message.

> Is this a known bug that's been fixed in beta4?
Possibly, reopen (for notifications) if it persists

And please, take it easy with beta versions..