When a node receives a comment, Notify sends out a notification email to alert subscribed users to the comment, as desired. However, it also resends the title/teaser of the node and announces the node as "new posts".

This is confusing, especially on a site that gets many comments. As the nodes are listed first and the comments at the bottom users believe there are new or updated nodes, even though there are only comments.

Suggested solution: Have new nodes first and then list the new comments below. There is no need to repeat the sending out of announcements of old nodes just because they receive a comment as the comments are announced separately.

Comments

matt2000’s picture

Please try the current dev version, this issue should be resolved there.

Anonymous’s picture

Sadly, the current dev does not work from me. It stops cron from running, and when I call cron.php manually I get the error "Fatal error: Cannot use object of type stdClass as array in /MYPATH/sites/all/modules/notify/notify.module on line 548", so I cannot test it...

Anonymous’s picture

Will there be a new dev version I could try soon?

parasolx’s picture

current -dev also still have this problem. as state it, it confused between new node and new comments.

parasolx’s picture

Assigned: Unassigned » parasolx
Status: Active » Needs review

argh.. found the problem.

at line 547,

$node = $node[$nid];

it supposed to be:

$node = $nodes[$nid];

the string should be $nodes not $node which cause the error shown. $node is reserve for drupal variable. while in this module, $nodes refer to the array. it fixed at my site.

Anonymous’s picture

Thanks for looking into this. I cannot seem to find the line of code in the module - do you refer to a dev or the 6.x-1.2 version (the latter is the one I use)?

izmeez’s picture

subscribing

izmeez’s picture

@parasolx, I'm not a module maintainer but really appreciate your work

comment #5 is very helpful, but I think it should actually be posted in the other issue http://drupal.org/node/935458 because it is a refinement of the patch in comment #1 of that issue.

In fact it might be best to create a new patch in that issue with this fix.

This issue might then be marked as a duplicate while work continues in the other issue queue.

Thank you

parasolx’s picture

@izmeez, i also not this module maintainer. this is a really big problem.

actually there are a lot of patch that have been produced but never being committed into community. last -dev version was committed on Feb 2011, almost 7 month without any new code applied.

i will contact the maintainer so that we can work out again about all patches.

regarding this issues, i will re-post this solution there.

izmeez’s picture

@parasolx, thanks for posting the solution in the other queue.

ON closer reading of this issue I don't think it is a duplicate of the other issue as this one is describing a problem with the content of the email being sent. I'll watch for further comments on this issue.

Anonymous’s picture

I agree with @izmeez, these seem to be two separate issues - related, but different problems, so I would suggest to keep the issues separate.

matt2000’s picture

Status: Needs review » Postponed (maintainer needs more info)

I norder to make progress on this, we need to clearly document:

1. The steps necessary to reproduce on a new Drupal install.
2. The expected results.
3. The actual results and how they differ from the expectation.

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Active

I am a little surprised to see a question about this after two years, but happy to see that there may no be a chance to tackle this. Here is my response, let me know if you require anything more:

1) Steps to reproduce the issue
- install Drupal
- install and set up the module (I use daily notification)
- create a new node and ensure that notifications will be sent for the node type
- wait until after the notification about the new node has been sent, then add a comment to the node

2) Expected results
An email notification should be sent that announces the new comment.

3) The actual results and how they differ from the expectation.
An email notification is sent that announces the new comment but also announces the node the comment (or comments) relate to as new, despite it not being new.

gisle’s picture

I am unable to reproduce this.

Steps:

  1. Installed Drupal 6.26 and Notify 6.x-1.2.
  2. Set up notifications to be sent every 15 minutes. Enabled notifications for Story.
  3. Created users "adam", "bevis" and "charles".
  4. Granted all users permissions to create content and to comment.
  5. Enabled Notify new content and Notify new comments for user "bevis"
  6. User "adam" created a Story.
  7. Waited for notification to be sent.
  8. User "charles" added a comment to the node.
  9. Waited for notification to be sent.

Body of the last notification email (step 9) is reproduced below. I think Notify behaves is as expected. (I.e. there is no notification of a new node, just of the comment.)

Greetings bevis,

------------------------------------------------------------------------------
Recent comments - 1 new comment
------------------------------------------------------------------------------

1 new comment attached to Story posted by adam: Story by adam
    1. This is a comment by charles
      http ://diw.ifi.uio.no/gruppe03/node/1#comment-3


--
This is an automatic e-mail from Drupal 6 test.
To stop receiving these e-mails, change your notification preferences at  
http://diw.ifi.uio.no/gruppe03/user/4/notify

(I've inserted a space after "http" to stop Drupal from turning it into a link.)

TfR75, could you be so kind and check again if this is reproducible?

And if anyone else could check to see if this issue or reproducible or not, it will be appreciated.

However, I've noticed that nodes with updated content is announced as "new posts". Is this what you're experiencing?

izmeez’s picture

@gisle we are seeing similar results and do not seem to have a problem.

gisle’s picture

Status: Active » Closed (cannot reproduce)

See comment #14 and #15.

gisle’s picture

Status: Closed (duplicate) » Closed (cannot reproduce)

Update: This bug was never in Notify 6.x-1.2. It was introduced in the patch attached to comment #1 in #935458: $nodes array modified inappropriately by comment notification logic in _notify_send() and made it into commit 5ec7f53 in 6.x-1.x-dev (committed on Oct. 8 2010).

The problem, and its solution, is in comment #9 under the same issue, and comment #5 in this issue.

There has obviously been some confusion about versions here, and I accept my share of blame for this.

As of this morning, the correction has been applied to the 6.x-1.x-dev developmen snapshot.

Since the bug was introduced in patch that was applied after the release of 6.x-1.2, it does not apply to that particular version.

Several issues report some similar problem. Here is the list:

gisle’s picture

Status: Closed (cannot reproduce) » Closed (duplicate)
izmeez’s picture

@gisle, thanks for taking care of this. We were using 6.x-1.2 with a series of patches in our make file so did not encounter this.

Status: Closed (cannot reproduce) » Closed (duplicate)