Rules, PET and Tokens

Created on 23 July 2014, over 10 years ago
Updated 17 January 2024, about 1 year ago

I'm having a little issue with 6.x version of the module - specifically the tokens.

In my PET template I have scattered some tokens (eventually I'd like to use custom tokens but for now I'm using tokens from the user object eg. [name]). I've written my own custom action for Rules which calls the pet_send_mail() function passing the appropriate arguments (pet name and recipients). The email sends but the tokens aren't being swapped out.

I've dug deeper into pet_send_mail and pet_send_one_mail I've noticed it does a couple of token_replace_multiple and the arguments being sent to it seem correct (a string and the substitutions array), but the string returned is the same string going in without tokens being replaced.

Also - I've noticed pet_send_mail takes an node id as it's third argument. What nid is this? As far as I can tell PET templates don't have an nid?

💬 Support request
Status

Closed: outdated

Version

1.5

Component

Miscellaneous

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024