CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Remove custom fatal error template path option
Pages: [1]

Author Topic: Remove custom fatal error template path option  (Read 535 times)

John.K

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 5
  • CiviCRM version: 4.x
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5
Remove custom fatal error template path option
April 22, 2015, 02:27:25 am
Summary
In the 'Debugging and Error Handling' settings it is possible to set a path to a custom fatal error template.

Surely the best approach to customizing the fatal error template is to override it using the custom template directory, the normal 'theming CiviCRM' approach: http://wiki.civicrm.org/confluence/display/CRMDOC/Theming+CiviCRM

Otherwise we are encouraging putting custom files inside the civicrm module itself, which is very bad practice.

Proposed resolution
Deprecate(?) and then remove the custom fatal path setting

Remaining tasks
Discuss
Create an issue in JIRA
(Submit, review and commit pull request to deprecate the functionality?)
Submit, review and commit pull request to remove the functionality
Update docs: https://wiki.civicrm.org/confluence/pages/editpage.action?pageId=86213553

JohnFF

  • I post frequently
  • ***
  • Posts: 235
  • Karma: 6
  • CiviCRM version: 4.4.13
  • CMS version: Drupal 7.28
  • MySQL version: 5.5.31-1
  • PHP version: 5.3.27
Re: Remove custom fatal error template path option
April 22, 2015, 02:17:24 pm
I agree - unless anyone can think of circumstances where:
a) non-coders would like to edit the template.
b) people would like to switch from one template to another and then back.

Neither of the above cases seem likely, but if they are used then this feature should be kept.

Another option I considered was having this as a text field where you actually enter the template itself. But since we don't do this for other templates I can't see a justification for it here.
If you like empowering charities in a free and open way, then you're going to love Civi.

Email Amender: https://civicrm.org/extensions/email-amender
UK Phone Validator: https://civicrm.org/extensions/uk-phone-number-validator
http://civifirst.com
https://twitter.com/civifirst

John.K

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 5
  • CiviCRM version: 4.x
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5
Re: Remove custom fatal error template path option
April 22, 2015, 04:25:13 pm
Thanks JohnFF. I agree those cases don't seem likely:

a) Non-coders would still need to copy and edit the original 'fatal.tpl' file, and then upload it into the CiviCRM directory somewhere. This isn't much different to doing it the 'right' way - the same method but the file goes in a different place and you don't have to change a GUI setting.

b) This could still be achieved, by storing the template by another name (eg: fatal-april) and then renaming it as required. Admittedly not through the GUI though.

c) Text field: we do currently have these for the email templates. But I think most non-coders would find trying to edit a smarty template through the interface a bit baffling. We could just do a WYSIWYG box to edit the 'introduction' message, but like you say I don't think we'd gain much from that.

John.K

  • I post occasionally
  • **
  • Posts: 75
  • Karma: 5
  • CiviCRM version: 4.x
  • CMS version: Drupal 7
  • MySQL version: 5.x
  • PHP version: 5
Re: Remove custom fatal error template path option
May 08, 2015, 07:56:40 am
Issue opened here: https://issues.civicrm.org/jira/browse/CRM-16478

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Remove custom fatal error template path option

This forum was archived on 2017-11-26.