Answers.Body: <p>This behaviour is a choice and could be changed. See the <a href="https://github.com/civicrm/civicrm-core/blob/ee228b94a3d6c646fd3982050d9e43743b69f305/CRM/Core/Smarty.php#L203" rel="nofollow noreferrer">error handler here</a>. If you want to propose a change of this behaviour (which I think would be a good idea, we should log a warning, but not fail completely), you can do that at <a href="https://lab.civicrm.org/dev/core/-/issues/new" rel="nofollow noreferrer">https://lab.civicrm.org/dev/core/-/issues/new</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-10-02T12:20:44.523Z
Answers.Text: Great thanks! I think it would definitely be a good option if there was a UI option for this. Some cases I'm sure that a full failure is preferred, but it doesn't at all make sense for my use case.
Answers.UserDisplayName: zip
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-09-29T19:48:30.030Z
Answers.LastActivityDate: 2023-09-29T19:48:30.030Z
Answers.UserDisplayName: Lars SG
Body: <p>Occasionally our staff users will screw up the tokens in mail; things like {event title} instead of {event.title}</p>
  <p>When this happens in a scheduled reminder it causes the reminder to not go out and also seems to cause some other reminders to not go out. Some still go out, but it seems like a bunch don't... I haven't worked that one out yet. They are also really hard to track down. We are alerted that there was an error on the status page, what the failed token is but not what template caused the error. The only way I've figured out how to find them is to go through the civicrm_action_schedule table to find the bad token.</p>
  <p>My question though is whether there is a way of having the smarty template process fail without stopping the email from going out. That is, I'd rather have the mail go out with &quot;{event title}&quot; than not go out at all. I'm not sure if this is really a Civi thing or. smarty thing though.</p>
  
Tags: <smarty>
Title: Is there a better way to handle Smarty template tag errors?
ThreadText: # Is there a better way to handle Smarty template tag errors?
  
  (Asked by: username_0 on 2023-09-28)
  
  Occasionally our staff users will screw up the tokens in mail; things like {event title} instead of {event.title}
  
  When this happens in a scheduled reminder it causes the reminder to not go out and also seems to cause some other reminders to not go out. Some still go out, but it seems like a bunch don't... I haven't worked that one out yet. They are also really hard to track down. We are alerted that there was an error on the status page, what the failed token is but not what template caused the error. The only way I've figured out how to find them is to go through the civicrm\_action\_schedule table to find the bad token.
  
  My question though is whether there is a way of having the smarty template process fail without stopping the email from going out. That is, I'd rather have the mail go out with "{event title}" than not go out at all. I'm not sure if this is really a Civi thing or. smarty thing though.
  
  **Tags:** smarty
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-09-29. Score: 1 | Accepted answer
  
  This behaviour is a choice and could be changed. See the [error handler here](https://github.com/civicrm/civicrm-core/blob/ee228b94a3d6c646fd3982050d9e43743b69f305/CRM/Core/Smarty.php#L203). If you want to propose a change of this behaviour (which I think would be a good idea, we should log a warning, but not fail completely), you can do that at <https://lab.civicrm.org/dev/core/-/issues/new>
  
  > **Comments:**
  > **username_0**: Great thanks! I think it would definitely be a good option if there was a UI option for this. Some cases I'm sure that a full failure is preferred, but it doesn't at all make sense for my use case.  
  
  ---
  
  