Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
On admin/structure/trigger/comment I have the following:
TRIGGER: WHEN EITHER SAVING A NEW COMMENT OR UPDATING AN EXISTING COMMENT
Name: Send e-mail to me when there is a new comment
On admin/config/system/actions I have the following:
system Send e-mail to me when there is a new comment
When I click "configure" and go to admin/config/system/actions/configure/81
In the message box, I have:
[comment:url:absolute]
Comment ID: <a href="https://example.com/comment/[comment:cid]#comment-[comment:cid]">[comment:cid]</a>
Comment Text:
[comment:body]
Comment Author:
[comment:author]
Comment Created:
[comment:created]
This is the email I receive, notice how it is not replacing comment:cid:
https://example.com/comment/#comment-
Comment ID:
Comment Text:
This is a test comment.
Comment Author:
auser
Comment Created:
February 5, 2015 - 21:20
Comments
Comment #1
Dave ReidThat trigger executes before the comment has actually been saved, so the corresponding $comment->cid value does not yet exist. You'd need to use a different trigger in order for that token to have a value.