Answers.Body: <p>As of 4.7 there is no more 'Fatal Error Template' setting. See <a href="https://issues.civicrm.org/jira/browse/CRM-16478" rel="nofollow">https://issues.civicrm.org/jira/browse/CRM-16478</a></p>
  
  <p>You can instead use the standard approach to overriding template files as described here: <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Theming+CiviCRM" rel="nofollow">http://wiki.civicrm.org/confluence/display/CRMDOC/Theming+CiviCRM</a></p>
  
  <p>The custom template directory can be set in: CiviCRM > Administer > System settings > Directories.</p>
  
  <p>If your custom directory was called 'customtemplates' then to override the fatal template you would upload your new template file to: ...customtemplates/CRM/common/fatal.tpl</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-23T10:01:51.383Z
Answers.LastActivityDate: 2016-05-23T10:01:51.383Z
Answers.UserDisplayName: John
Answers.Body: <p>you can override (not recommended):</p>
  
  <p>templates/CRM/common/fatal.tpl</p>
  
  <p>or set your custom error template here: </p>
  
  <p><a href="http://d46.demo.civicrm.org/civicrm/admin/setting/debug?reset=1" rel="nofollow noreferrer">http://d46.demo.civicrm.org/civicrm/admin/setting/debug?reset=1</a></p>
  
  <p><img src="https://i.sstatic.net/m2Cbe.jpg" alt="CiviCRM Error Settings / Handler"></p>
  
  <p>You can also specify a different error handler in that setting</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-14T16:43:28.397Z
Answers.Text: Thanks, Lobo. That fatal.tpl template does not get pulled into the Drupal theme (I see that there is some logic related to Joomla and Wordpress, so perhaps it does get pulled into the theme on those CMS's). I get that I can override the template with a custom version, but how do I get that template pulled into the theme?
Answers.UserDisplayName: Laryn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-14T18:08:45.810Z
Answers.Text: You will need to do so via the custom fatal error handler. The main reason civi does not do it, is so it can display errors even if there is a fatal error due to some CMS issue / bootstrapping. There have been cases where the fatal error handler was stuck in an infinite loop, hence the radically simple, yet super ugly fatal page
Answers.UserDisplayName: Donald Lobo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-14T18:25:55.223Z
Answers.Text: Would it be a bad idea to bootstrap Drupal within the fatal.tpl template? Or is there a default PHP error-handling file I can use as a base?
Answers.UserDisplayName: Laryn
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-15T01:10:05.343Z
Answers.Text: I dont think so, especially once you have a working system.
Answers.UserDisplayName: Donald Lobo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-23T09:57:02.733Z
Answers.Text: As of 4.7 the 'Fatal error template' setting doesn't exist, in favour of using the 'standard' approach to overriding templates.
Answers.UserDisplayName: John
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-14T16:22:46.547Z
Answers.LastActivityDate: 2015-05-14T16:53:39.887Z
Answers.LastEditDate: 2015-05-14T16:53:39.887Z
Answers.UserDisplayName: Donald Lobo
Answers.Body: <p>Another (simpler) option that comes from a slightly different angle -- set up a Page Redirect using Eileen's extension so the user doesn't see the error message at all. This extension redirects all traffic from disabled contribution pages to a default contribution page (which you specify). So if you have a disabled customized donate page that you used temporarily, you can redirect anyone who comes to that page to the default live donate page, for example.</p>
  
  <ul>
  <li>GitHub: <a href="https://github.com/eileenmcnaughton/nz.co.fuzion.pageredirect" rel="nofollow">nz.co.fuzion.pageredirect</a></li>
  </ul>
  
  <p>How to use:</p>
  
  <ol>
  <li>Install as usual for CiviCRM Extensions</li>
  <li>Visit <strong>civicrm/admin/setting/customredirect</strong> and enter the ID of the contribution page you'd like to redirect to.</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-20T21:08:31.753Z
Answers.LastActivityDate: 2016-05-20T21:22:56.017Z
Answers.LastEditDate: 2016-05-20T21:22:56.017Z
Answers.UserDisplayName: Laryn
Body: <p>On occasion, CiviCRM produces an error page like this (for example, when someone tries to visit a contribution page that has since been disabled):</p>
  
  <p><img src="https://i.sstatic.net/dyOtB.jpg" alt="CiviCRM error page: Sorry but we are not able to provide this at the moment. The page you requested is currently unavailable."></p>
  
  <p>How can I make sure that this shows up in the site's theme instead of a blank white, unfriendly, actually-rather-scary page?</p>
  
  <p><strong>BONUS FOLLOWUP:</strong> would it be possible to set up a redirect setting for specific disabled pages, to forward them to a live page, or a more descriptive message?</p>
  
Tags: <error-page><theme>
Title: How can I set up the default CiviCRM error page/message inside the site template?
ThreadText: # How can I set up the default CiviCRM error page/message inside the site template?
  
  (Asked by: username_0 on 2015-05-14)
  
  On occasion, CiviCRM produces an error page like this (for example, when someone tries to visit a contribution page that has since been disabled):
  
  ![CiviCRM error page: Sorry but we are not able to provide this at the moment. The page you requested is currently unavailable.](https://i.sstatic.net/dyOtB.jpg)
  
  How can I make sure that this shows up in the site's theme instead of a blank white, unfriendly, actually-rather-scary page?
  
  **BONUS FOLLOWUP:** would it be possible to set up a redirect setting for specific disabled pages, to forward them to a live page, or a more descriptive message?
  
  **Tags:** error-page, theme
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2016-05-23. Score: 2 | Accepted answer
  
  As of 4.7 there is no more 'Fatal Error Template' setting. See <https://issues.civicrm.org/jira/browse/CRM-16478>
  
  You can instead use the standard approach to overriding template files as described here: <http://wiki.civicrm.org/confluence/display/CRMDOC/Theming+CiviCRM>
  
  The custom template directory can be set in: CiviCRM > Administer > System settings > Directories.
  
  If your custom directory was called 'customtemplates' then to override the fatal template you would upload your new template file to: ...customtemplates/CRM/common/fatal.tpl
  
  
  ---
  
  ### Answer by username_2 on 2015-05-14. Score: 4
  
  you can override (not recommended):
  
  templates/CRM/common/fatal.tpl
  
  or set your custom error template here:
  
  <http://d46.demo.civicrm.org/civicrm/admin/setting/debug?reset=1>
  
  ![CiviCRM Error Settings / Handler](https://i.sstatic.net/m2Cbe.jpg)
  
  You can also specify a different error handler in that setting
  
  > **Comments:**
  > **username_0**: Thanks, username_2. That fatal.tpl template does not get pulled into the Drupal theme (I see that there is some logic related to Joomla and Wordpress, so perhaps it does get pulled into the theme on those CMS's). I get that I can override the template with a custom version, but how do I get that template pulled into the theme?  
  > **username_2**: You will need to do so via the custom fatal error handler. The main reason civi does not do it, is so it can display errors even if there is a fatal error due to some CMS issue / bootstrapping. There have been cases where the fatal error handler was stuck in an infinite loop, hence the radically simple, yet super ugly fatal page  
  > **username_0**: Would it be a bad idea to bootstrap Drupal within the fatal.tpl template? Or is there a default PHP error-handling file I can use as a base?  
  > **username_2**: I dont think so, especially once you have a working system.  
  > **username_1**: As of 4.7 the 'Fatal error template' setting doesn't exist, in favour of using the 'standard' approach to overriding templates.  
  
  ---
  
  ### Answer by username_0 on 2016-05-20. Score: 3
  
  Another (simpler) option that comes from a slightly different angle -- set up a Page Redirect using Eileen's extension so the user doesn't see the error message at all. This extension redirects all traffic from disabled contribution pages to a default contribution page (which you specify). So if you have a disabled customized donate page that you used temporarily, you can redirect anyone who comes to that page to the default live donate page, for example.
  
  * GitHub: [nz.co.fuzion.pageredirect](https://github.com/eileenmcnaughton/nz.co.fuzion.pageredirect)
  
  How to use:
  
  1. Install as usual for CiviCRM Extensions
  2. Visit **civicrm/admin/setting/customredirect** and enter the ID of the contribution page you'd like to redirect to.
  
  
  ---
  
  