Hi greggless

Everything checked: deafult notify ON, All comments ON.

When registered user (not user 1) create a node and after somebody put a first comment , the node author is not notified.
After second comment both are notified - node author and first comment author.

When user 1 create a node and some of users create first comment, user 1 is correctly notified.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

allen.wong’s picture

We're having a similar problem. The creator of a new forum topic does not have the option to elect to receive an e-mail notification when someone responds to the posting. We spent a little time debugging this and found that this is because a new forum topic doesn't have a node type ($node->type was null). We tweaked the module a bit to make this work but we're not certain if this fix is correct. We have not deployed the below patch in production yet, only on our development site.

--- comment_notify.module-orig 2010-03-10 14:29:40.000000000 -0800
+++ comment_notify.module 2010-05-11 07:40:19.000000000 -0700
@@ -79,13 +79,17 @@
global $user;

// Only alter the form if it's a comment form and the user has the permission to subscribe.
- if ($form_id == 'comment_form' && (user_access('subscribe to comments') || user_access('administer comments'))) {
+
+ // Allow posters of new Forum topics to receive e-mail notification.
+ if (user_access('subscribe to comments') || user_access('administer comments')) {
// Only add the checkbox if this is an enabled content type
$node = node_load($form['nid']['#value'] ? $form['nid']['#value'] : $form['nid']['#default_value']);
$enabled_types = variable_get('comment_notify_node_types', drupal_map_assoc(array($node->type)));
- if (empty($enabled_types[$node->type])) {
- return;
- }
+
+ // Allow posters of new Forum topics to receive e-mail notification.
+ // if (empty($enabled_types[$node->type])) {
+ // return;
+ // }

$available_options = _comment_notify_options();

benone’s picture

I can confirm it is not needed.

I just didn't notice that 'Receive node follow-up notification e-mails' field was not checked in those users accounts.
Now it is set by default , so each new user has this field already checked.

Your mods adds 'Notify me when new comments are posted' to each node form which is ok, but actually not needed when you check 'Subscribe users to their node follow-up notification emails by default' field here: /admin/settings/comment_notify

NancyDru’s picture

That seems to have taken care of my problem.

greggles’s picture

@NancyDru - thanks for letting me know.

Could anyone provide this as a patch?

allen.wong’s picture

Patch provided is probably incorrect. Our Drupal theme had hidden the "Notify me of changes..." option at the top of every page on our site.

Chad_Dupuis’s picture

sub

greggles’s picture

Title: First comment notify sent only if user 1 is the node author » Create sane default variables during install so the module works with as little configuration as possible
Category: bug » feature
Status: Active » Needs review
FileSize
3.09 KB

I'm retitling this. My impression is that the real problem here is that people aren't saving the permissions nor the settings page.

If someone thinks differently, please post a patch and simplified, repeatable steps so I can see the bug.

The attached patch:
1. Enables comment notify for content types that have comments enabled.
2. Only enables the "all comments on this node" notification mode

Status: Needs review » Needs work

The last submitted patch, 781494_sane_defaults_comment_notify.patch, failed testing.