Search code examples
c1-cms

Composite C1: How do disable in page errors


When we roll out to production, we want to make sure the errors produced by Composite C1 aren't seen by users. This is an example of a forced Exception thrown by an MVC Function test that is rendered directly in the page.

in page error

The following is in the web.config

<customErrors mode="On" defaultRedirect="/Errors/Site-Error">
      <error statusCode="404" redirect="/Errors/Page-Not-Found" />    </customErrors>
<compilation debug="false" optimizeCompilations="false" targetFramework="4.6">

Thank you


Solution

  • In v5 we introduced a way to turn this feature off.

    In ~/App_Data/Composite/Composite.config locate the element

    /configuration/Composite.Core.Configuration.Plugins.GlobalSettingsProviderConfiguration/GlobalSettingsProviderPlugins/add

    and the the attribute "prettifyRenderFunctionExceptions" to "false"

    Source: https://github.com/Orckestra/C1-CMS/issues/130