1

I am trying to notify the node author of a new comment on their node.

Using Drupal 8.3

Created new reaction rule.

Send to: comment.entity_id.entity.uid.entity.mail.value

email address is not being picked up

I get this email from system:

A message that you sent contained no recipient addresses, and therefore no delivery could be attempted.

5
  • have you tried debugging by inspecting the token values incrementally? In other words- render/log comment.entity_id.entity.uid to see if you get the actual user id of the author? If you navigate to /admin/help/token , you'll get a full list of tokens, and should be able to test/debug the values to see the desired result that populates your send to field. Commented Oct 26, 2017 at 16:28
  • based on this legacy thread for D7, drupal.org/node/1362258; I think the token should be something like: comment:entity:entity:author:mail Commented Oct 26, 2017 at 16:30
  • Hi Anson, I tried debugging it and don't get an email. But according to this drupal.stackexchange.com/questions/201079/… it should have worked.
    – Progonat
    Commented Oct 28, 2017 at 4:00
  • I don't see the token you mention. Can only get comment:entity. Then it doesn't expand anymore.
    – Progonat
    Commented Oct 28, 2017 at 4:02
  • Not sure if this is right [comment:author:original:mail]
    – Progonat
    Commented Oct 28, 2017 at 4:02

1 Answer 1

1

This worked.

As a workaround, you can use the data selection string as a token in the direct input textarea.

Switch to data selection and get your string, in my case content_moderation_state.uid.entity.mail.value

Switch to the direct input mode and paste the string with double braces {{content_moderation_state.uid.entity.mail.value}} to use the token replacement API.

As described here: https://www.drupal.org/project/rules/issues/2799569#comment-12376804

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.