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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

guillaumev’s picture

Status: Needs review » Fixed

Thank you, I just committed this.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

C-Logemann’s picture

This 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

xurizaemon’s picture

Status: Closed (fixed) » Active

I 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.

xurizaemon’s picture

Status: Active » Closed (fixed)
msti’s picture

I get the problem described at #4
I am also using commerce_email.

msti’s picture

Issue summary: View changes
Status: Closed (fixed) » Active