I am using Rules to send e-mail updates to my users when a comment is made on a node. Some fields in my node have driven properties enabled, and I would like the e-mail to include a summary of the changes. The obvious way to do this is with the [comment:comment-driven-diff-table] Token. However, this doesn't work. The diff-table token return blank, and tokens for fields that Driven was supposed to update still return the old values.

After some troubleshooting, I've come to believe that the problem is Drupal's order of operations:

The rule that sends my e-mail is a Triggered Rule. The trigger event is "after saving a new comment."
Drupal's behavior as I have observed it:
1) Save the comment
2) Trigger the rule and fire off the e-mail.
3) Update node per comment_driven

So as you can see when the e-mail is fired (and when the token is checking the database) there is no diff. table for the token to read. Thus the token is blank. Other other tokens for comment-driven fields show the old values.

Rules also provides a trigger option "after a comment is published." It seems like "publish comment" would be number 4 on the order of operations, thus that option would work, but alas setting that trigger didn't make a difference. (i didn't test this as thoroughly as I'd like due to time constraints)

So anyway. This seems like quite a mess. 3 or 4 different modules interacting here to cause this problem. But really this seems like a question of when comment_driven creates the diff. table in relation to the triggers that are available in Rules.

Any assistance would be greatly appreciated. This is a pretty important functionality for my site.

Thank you.

Comments

arhak’s picture

where do I follow you?
in this new issue or in previous #891532-3: Problem using Rules Module to send e-mail updates on Comment_Driven changes.?

PS: did you actually intended to address this against 6.x-1.0-unstable1?

arhak’s picture

Status: Active » Closed (duplicate)