Substitutions on event reminder template failing

Hi there!

I’m having a weird problem on Event email reminders.

I setup an email template with some substitutions

After that, I created and event and set an email reminder using this new template. I receive the email but some of the substitutions are not executed as you can see in the image bellow:

I checked several times that there is no format interfering or that writing was incorrect. I got the variables form Dolibarr variables list and I even checked the code and validated that these substitutions exists:

Any ideas if I’m doing something wrong? Am I missing a conf setting?

Dolibarr version 18.0.3

Thanks a lot in advanced

Hello
It reminded me a bug but I don’t find it now on GitHub…

You can always try to update to v18.0.6,

1 Like

Well…I debugged a little bit and found a work around…I added a few lines of code within actioncomm.class.php right where the email and substitutions are exceuted:

$societe_tmp = new Societe($this->db);
$societe_tmp->fetch($this->socid);
$soc_substitutions = getCommonSubstitutionArray($langs, 0, ‘’, $societe_tmp);

//this lines goes right before complete_substitutions_array()
$substitutionarray = array_merge($substitutionarray, $soc_substitutions);

And this one after
$sendTopic = (!empty($arraymessage->topic))…
$sendTopic = make_substitutions($sendTopic, $substitutionarray);

Good!

Can you post your modification on GitHub ?