# Substitutions on event reminder template failing

**URL:** <https://www.dolibarr.org/forum/t/substitutions-on-event-reminder-template-failing/29844>\
**Category:** CRM/SRM Modules\
**Created:** [January 14, 2025, 3:33pm UTC](https://www.dolibarr.org/forum/t/substitutions-on-event-reminder-template-failing/29844 "2025-01-14T15:33:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![levelit](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/levelit/32/6895_2.png) [@levelit](https://www.dolibarr.org/forum/u/levelit)\
**Post date:** [January 14, 2025, 3:33pm UTC](https://www.dolibarr.org/forum/t/substitutions-on-event-reminder-template-failing/29844/1 "2025-01-14T15:33:52Z")

</div>

Hi there!

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

I setup an email template with some substitutions

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/e/eeedfd63f9fc148724eee2d5d1ec47e865dadee3.png)

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:

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/d/d9a72bb70bbba99dfd5e86ae46b3982fbfdbc217.png)

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:

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/a/a0518ed65ecde5615b9cd696814ab72f83bd47a2.png)

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

Dolibarr version 18.0.3

Thanks a lot in advanced

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [January 14, 2025, 9:13pm UTC](https://www.dolibarr.org/forum/t/substitutions-on-event-reminder-template-failing/29844/2 "2025-01-14T21:13:38Z")

</div>

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,

---

<div class="post-metadata">

**Author:** ![levelit](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/levelit/32/6895_2.png) [@levelit](https://www.dolibarr.org/forum/u/levelit)\
**Post date:** [January 14, 2025, 9:43pm UTC](https://www.dolibarr.org/forum/t/substitutions-on-event-reminder-template-failing/29844/3 "2025-01-14T21:43:54Z")

</div>

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:

 ![image](https://www.dolibarr.org/forum/uploads/dolibarrorg/original/2X/0/06bbaed0f2fbb18fbab3dc12442fcc001206aff5.png)

$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);

---

<div class="post-metadata">

**Author:** ![ksar](https://www.dolibarr.org/forum/user_avatar/www.dolibarr.org/ksar/32/514_2.png) [@ksar](https://www.dolibarr.org/forum/u/ksar)\
**Post date:** [January 14, 2025, 9:55pm UTC](https://www.dolibarr.org/forum/t/substitutions-on-event-reminder-template-failing/29844/4 "2025-01-14T21:55:01Z")

</div>

Good!

Can you post your modification on GitHub ?
