Closed (fixed)
Project:
Rules
Version:
6.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Aug 2007 at 18:31 UTC
Updated:
1 Sep 2025 at 08:37 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
fagoIt's not possible currently. Perhaps best it would be to write an action, that can inform comment author of replied comments for a given comment - then it would work.
Comment #2
mauro72 commentedThank's for your answer, I'll give a try to that.
Comment #3
dwils03 commentedIs there any more support for this? I also am looking to do this exact thing. Has it been integrated in later releases since then? Is there an easy way to do it now?
Thanks.
Comment #4
amitaibuMaybe this module can assist you - http://drupal.org/project/notifications
Comment #5
mitchell commentedThis is easy to setup using Rules. Event: when comment is published, Action: send email to node author with body [comment:body] (something like that).
I'll leave this open, because this should really be turned into a documentation page.
For more complex Rules, you can use Flag. This is the main topic in this issue: #34496: [meta] Add Flag module to allow users to subscribe/unsubscribe without posting a comment.
Comment #6
Uersu commentedYou say correctly that it is easy to send e-mail to the node author.
However, the problem comes when another user (e.g. the original node author) replies to the comment. In this case you may not want to send e-mail to the original node author, but instead to the guy that wrote the first comment.
This currently is not supported.
If I am not mistaken, then the comments table contains the following columns:
Now, rules does provide the [comment:comment-cid], [comment:comment-nid] and [comment:comment-author-uid]. However, I seem to be missing the PID! Did I oversee something?
If this field is provided, then at least the simple case could be solved.
Comment #7
Uersu commentedDid anybody find a solution to this missing "parent comment id"?
Comment #8
betoaveigaWhen you save a comment and you load it (using rules) you can obtain the pid.
Load this pid (parent comment) with _comment_load, and then you'll get a comment object with an uid field, which is the user that post the parent comment.
Load this user (user_load) and you'll get email you are looking for.
Hope that helps...
Comment #9
itangalo commentedAs Uersu points out, the PID element of comments are not available as a token. This should, I think, be posted as an issue to the Token module -- the PID value is pretty useful to have.
While waiting for this in Token, the PID can be fetched using a line of PHP (as BetoAvegia also points out).
I've attached an example of how to fetch the relevant e-mail addresses when a new comment is posted. I'm just printing them out in a message to the user, so you should change the actions to something more appropriate if you use the feature.
The configuration is saved as a Feature -- se http://drupal.org/project/features -- but can also be installed as a regular module.
Good luck!
//Johan Falk, NodeOne, Sweden
PS: I'm not maintaining the Rules module, just helping with support questions. You are welcome to ask more questions at http://groups.drupal.org/rules
Comment #10
itangalo commentedComment #11
Hunabku commentedIf you're interested in a triggered rules and rules set solution for sending emails to both node authors and comment authors when a comment or reply is made, you might want to check out the following link:
http://drupal.org/node/724094#comment-3718596
Comment #12
shana598brush commentedThank you for your kind words! Yes, what you're describing is possible with Workflow-ng. You can create a rule that triggers when a comment reply is posted, checks the original comment's author, and sends them an email notification—even if the replier isn't the node author. Just ensure the condition targets the comment entity and the action uses the original comment's user email. This setup keeps users engaged and informed. hhaexchange