silverstripe-cms/tests/model/ErrorPageTest.yml
Will Rossiter ddc2e3822b FIX: ErrorPage generating empty responses for 403/401 requests
Previously by setting the response status code inside the action, this prevented response bodies from being included due to 403/401 being matched by SS_HTTPResponse::isFinished() (which stops popular

I assume SS_HTTPResponse::isFinished() is valid for the permission error use case (and I would be hesitant to change it) so this simply moves the declaration of the response status code till after the parent has populated the body of the response.
2013-11-18 16:32:15 +13:00

11 lines
291 B
YAML

ErrorPage:
404:
Title: Page Not Found
URLSegment: page-not-found
Content: My error page body
ErrorCode: 404
403:
Title: Permission Failure
URLSegment: permission-denied
Content: You do not have permission to view this page
ErrorCode: 403