2017 © Pedro Peláez
 

silverstripe-vendormodule errorpage

ErrorPage component for SilverStripe CMS

image

silverstripe/errorpage

ErrorPage component for SilverStripe CMS

  • Monday, July 30, 2018
  • by robbieaverill
  • Repository
  • 8 Watchers
  • 2 Stars
  • 82,428 Installations
  • PHP
  • 9 Dependents
  • 0 Suggesters
  • 8 Forks
  • 4 Open issues
  • 27 Versions
  • 36 % Grown

The README.md

Silverstripe ErrorPage Module

CI Silverstripe supported module, (*1)

Overview

Provides an ErrorPage page type for the Silverstripe CMS, allowing CMS authors to set custom content for error page responses by error code. Error page responses are fully themed., (*2)

Installation

composer require silverstripe/errorpage

Limitations

The functionally in this module was separated out from the Silverstripe CMS module and retains some existing issues. An issue of note is that static error pages are generated but are rarely served up, and rarely re-generated. This can lead to website visitors seeing a stale or broken page in the event of a 500 server error. Contributions are welcome, please open a pull request if you want to add a feature or fix a problem., (*3)

Documentation

To Do, (*4)

Theming

To apply a custom template for the error page you will need to create a ErrorPage.ss file in either templates/SilverStripe/ErrorPage/ErrorPage.ss or templates/SilverStripe/ErrorPage/Layout/ErrorPage.ss, (*5)

Detailed error messages

If you're using $this->httpError($code, $message) in your codebase and want to include the message that is passed into that method, you can add the $ResponseErrorMessage to your ErrorPage template. Use caution when including this information, as these messages are often intended for developers rather than end-users., (*6)

For example, one of your controllers may throw a 401 status code for some specific reason. Very broadly, a 401 means the request is Unauthorised; if your controller throws a 401, it can add also add a specific reason:, (*7)

YourController.php return $this->httpError(401, 'This is only accessible on Sunday before 10AM.');, (*8)

```YourErrorPage.ss , (*9)

$Title

$ResponseErrorMessage , (*10)


These messages are appended to the ErrorPage template automatically when the site is in dev mode. You can disable this using the Config API. Setting this to false will also remove the $ResponseErrorMessage variable from your template. ```yml SilverStripe\ErrorPage\ErrorPage: dev_append_error_message: false

Limiting options in the CMS

By default, all available error codes are present in the dropdown in the CMS. This can be overwhelming and there are a few (looking at you, 418) that can be confusing. To that end, you can limit the codes in the dropdown with the config value allowed_error_codes like so:, (*11)

SilverStripe\ErrorPage\ErrorPage:
  allowed_error_codes:
    - 400
    - 403
    - 404
    - 500

Reporting Issues

Please create an issue for any bugs you've found, or features you're missing., (*12)

The Versions

30/07 2018

dev-master

9999999-dev http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

30/07 2018

1.x-dev

1.9999999.9999999.9999999-dev http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

30/07 2018

1.2.x-dev

1.2.9999999.9999999-dev http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

30/07 2018

1.2.1

1.2.1.0 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

24/07 2018

1.2.0

1.2.0.0 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

19/06 2018

1.1.x-dev

1.1.9999999.9999999-dev http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

19/06 2018

1.1.2

1.1.2.0 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

15/06 2018

1.2.0-beta1

1.2.0.0-beta1 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

13/03 2018

1.1.0

1.1.0.0 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

13/03 2018

1.1.1

1.1.1.0 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

14/02 2018

1.1.0-rc2

1.1.0.0-RC2 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

05/02 2018

1.1.0-rc1

1.1.0.0-RC1 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

05/02 2018

1.0.x-dev

1.0.9999999.9999999-dev http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

05/02 2018

1.0.3

1.0.3.0 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

05/02 2018

1.0.4.x-dev

1.0.4.9999999-dev http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

05/02 2018

1.0.4

1.0.4.0 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

25/01 2018

1.0.2

1.0.2.0 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

06/12 2017

1.0.1

1.0.1.0 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

06/12 2017

1.0.1-rc1

1.0.1.0-RC1 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

02/11 2017

1.0.0

1.0.0.0 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

02/11 2017

1.0.0-rc2

1.0.0.0-RC2 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

02/11 2017

1.0.0-rc3

1.0.0.0-RC3 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

12/10 2017

1.0.0-rc1

1.0.0.0-RC1 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

11/10 2017

1.0.0-beta4

1.0.0.0-beta4 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

08/09 2017

1.0.0-beta3

1.0.0.0-beta3 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

07/08 2017

1.0.0-beta2

1.0.0.0-beta2 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage

03/07 2017

1.0.0-beta1

1.0.0.0-beta1 http://silverstripe.org

ErrorPage component for SilverStripe CMS

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

silverstripe error errorpage