Details
-
Type: Improvement
-
Status: Open
-
Priority: Minor
-
Resolution: Unresolved
-
Affects Version/s: 4.4.4
-
Fix Version/s: Unscheduled
-
Component/s: Core CiviCRM
-
Labels:None
-
Versioning Impact:Patch (backwards-compatible bug fixes)
Description
A thought inspired by comments on CRM-14318.
I've seen a few instances where clients had edited Smarty in the UI, and saved invalid Smarty to the DB (although this will apply equally to file-stored .tpl).
Invalid Smarty syntax will throw a fatal when the template is used, killing CiviCRM off midway through whatever process it's engaged in - storing a contribution, contact, membership etc.
This is one of the places where CiviCRM's mixing of templates and logic shows its weakness, and it's invisible to the admin since it only displays to the end user.
Perhaps we ensure templates are valid both before DB save and before use? (Showing "Invalid template" would be far better than fatal.)