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.
The module runs it's own token evaluation instead of calling the standard RulesTokenEvaluator class.
I think we should call evaluate on whatever is set for $element->settings['variable:process'].
I noticed this problem after applying this a pending rules patch. The patch works for everything except the variable email texts. Calling evalute on the RulesTokenEvaluator solved the problem.
Comment | File | Size | Author |
---|---|---|---|
0001-use-standard-rules-token-evaluation.patch | 3.55 KB | pluess |
Comments
Comment #1
guillaumev CreditAttribution: guillaumev commentedThank you, I just committed this.
Comment #3
C-LogemannThis change looks good because of more common compatibility but it causes also some problems in other modules.
#1759140: Token API change in dev needs documentation and maybe an own branch
Comment #4
xurizaemonI found with this fix applied that tokens weren't replacing, because
isset($element->settings['variable:process'])
was not true.Using with a rule that contained actions to send Commerce Email and a custom email after that. I can't see where in Variable Email, Variable or Commerce Email that setting is set - is it version specific?
Added a comment at #1759140-11: Token API change in dev needs documentation and maybe an own branch with more details. This is closed and committed but may need to be reviewed as part of that issue.
Comment #5
xurizaemonComment #6
mstiI get the problem described at #4
I am also using commerce_email.
Comment #7
msti