Comment notifications

As site member, I would like to be notified when my content receives a comment. This is important since it helps me being aware of and respond to feedback.

How to Demo: 
  1. Log in to the site. Verify that the user account has an e-mail you can access.
  2. Create a documentation page.
  3. Log out and log in as another user. Post a comment to the new documentation page.
  4. Verify that a notification is sent node author, with a link to the comment.
  5. Log out and log in as the first user again. Post a reply to the comment.
  6. Verify that no notification is sent to the user when commenting her own content.
Required Preparations: 
  • The site should have a documentation page content type, as provided by the first exercise in this suite.
Additional Comments: 
  • This feature could be extended by using a checkbox field on the user page, where each user may select if she wants comment notifications or not.
Modules: 
Downloads: 
AttachmentSize
1.56 KB
Suggested Solution: 
  1. Create a new reaction rule with the name comment notification. Have it react on the even after saving a new comment. (See configuring reaction rules in chapter 12.)
  2. Add a condition data comparison, and use data selection to compare comment:author with comment:node:author. Check the negate option, to have this condition return true if the two objects are different. (See managing conditions in chapter 12.)
  3. Add an action send mail. Set the to field to comment:node:author:mail (using data selection), the subject to new comment to [comment:node:title] and make sure to include the [comment:url] replacement pattern in the message to have a link to the comment. Leave the from field empty to use the site default e-mail address.
Solution Video: