Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-14320

Invalid Smarty triggers fatal errors

    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.)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              xurizaemon Chris Burgess
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: