I need to set up Author subscription feature on my site. But it seems that this module doesn't work for D7. It simply doesn't send email notifications. I checked logs and there are no errors, it just don't send notification mail.
I tried different sending methods, checked all variations of settings - same result, mail notification are not sending at all.
Content subscription works fine, content type works properly too, test mail sending correctly. Only this module don't work.

Any others have this bug too?

Please help.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

berekel’s picture

Assigned: berekel » Unassigned
vrc3’s picture

Yes, I am experiencing this bug as well.

jide’s picture

Same here, using the latest dev version.

jide’s picture

Looking at the code, class Notifications_User_Content_Subscription extends Notifications_Content_Subscription. Moreover hook_notifications() in notifications_user.module skips things like 'event types', 'object types', 'message templates', 'event classes'... and does not implements hook_action_info() etc.

I guess notifications_content should somehow trigger things for notifications_user, but I have no clues how this should be done... If anyone has some tips, I should be able to do the code.

kerrymick’s picture

I also have this issue with my site. Has anyone been able to figure this problem out? Any help is hugely appreciated.

amarnus’s picture

Have attached a patch and a test file along with it. If you still have a need for this feature, do help me test it.

czigor’s picture

Status: Active » Needs work

Just what I was needing today! However, I cannot apply the patch.
Is this against the latest dev? Also, I think patches should be relative to the module dir.

amarnus’s picture

My bad, @czigor. Re-rolled patch. Now against latest 7.x-1.x-dev.

czigor’s picture

Applying the patch I get a

patching file notifications_user/notifications_user.inc
patching file notifications_user/notifications_user.info
Hunk #1 FAILED at 6.
1 out of 1 hunk FAILED -- saving rejects to file notifications_user/notifications_user.info.rej
patching file notifications_user/notifications_user.module
patching file notifications_user/notifications_user.test

So I need to patch notifications_user/notifications_user.info manually. The reason of the failure is that my info file does not end after files[]. Have you downloaded the dev from http://ftp.drupal.org/files/projects/notifications-7.x-1.x-dev.tar.gz?

After this, however, the patch works great, thanks! I will test it further.

amarnus’s picture

Final (hopefully) re-roll.

Didn't know that the info added by the Drupal package script is not tracked in the git repo. My earlier patch would work against the head of the 7.x-1.x branch.

amarnus’s picture

Status: Needs work » Needs review
sheise’s picture

#10 seems to do the trick for me. Thanks!

amarnus’s picture

Status: Needs review » Reviewed & tested by the community
sajosh’s picture

In case there's still hesitation by this wonderful modules owner about patch #10, I'm posting my results here.

In short, the patch works.

Longer version. I started a fresh install of drupal 7.21 and just sandboxed some ideas for a while. I landed on a OG, Notifications 7.x-1.0-alpha2 and Messaging 7.x-1.0-alpha2 solution. But for some reason the notifications just seemed so so buggy. Notifications by author weren't working for non-admin users. I tried many many combinations.

Finally, I deleted the installation and DB and started over again. This time with a intent focus on get notifications to work in OG. I installed D 7.22 and Notifications 7.x-1.x-dev and Messaging 7.x-1.x-dev. I still couldn't get notifications by author to work.

Luckily I found this post and patch. Installed the patch and it all now works.

I've tested several combinations first without OG then with OG and it all works.

xeniak’s picture

The problem I see with this solution is that it adds another field instead of using the existing Notifications_User_Field, with the unfortunate side effect of breaking the field autocomplete on the subscription form. Instead, I added the following code to notifications_user.module:

/**
 * Implements hook_notifications_event().
 */
function notifications_user_notifications_event($op, $event) {
  switch ($op) {
    case 'trigger':
      if ($event->type == 'node-post') {
        $node = node_load($event->objects['node']->value);
        $event->add_object('user', $node->uid);
      } elseif ($event->type == 'node-comment') {
        $comment = comment_load($event->objects['comment']->value);
        $event->add_object('user', $comment->uid);
      }
  }
}
DamienMcKenna’s picture

  • Nafes committed 31a27bb on 7.x-1.x authored by amarnus
    Issue #1268970 by amarnus: "User subscriptions" module -  doesn't work
    

  • Nafes committed e33bdcc on 7.x-1.x
    Issue #1268970 by amarnus: Fixed class commants.
    
Nafes’s picture

Status: Reviewed & tested by the community » Fixed

Cleared some trailing whitespaces and committed. Thanks amarnus!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.