Tokens are not replaced on Contact forms

Created on 25 February 2024, 9 months ago

Problem/Motivation

Tokens used on contact forms are not being replaced.

Steps to reproduce

Enable the override for the Contact form.
On the policy, add a token to the contact form body, such as [site:name]
Send an email and check that the token wasn't replaced by its actual value.

Proposed resolution

Checking on #3258789: System emails sent from actions missing token replacement and after some debugging, I noticed that just adding use TokenProcessorTrait; to the ContactPageEmailBuilder solved the problem for me. But I was wondering if this TokenProcessorTrait shouldn't actually be used on all EmailBuilder's... Can't we, for example, add the token replacement logic into EmailProcessorTrait::postRender?

Or maybe I did smth wrong on my configuration...?

Remaining tasks

Discuss about the problem and provide a patch

User interface changes

-

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇧🇷Brazil hmendes

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

Comments & Activities

Production build 0.71.5 2024