You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure whether this is intentional or not, however when Who can view pages on this site? is set to either Logged-in users or "Only these groups" (ie: required permission), a dev/build will generate blank (0-byte) assets/error-(404|500).html files.
The text was updated successfully, but these errors were encountered:
I've also just hit this. We have the entire site protected by login and when an unauthenticated user attempts to view a 404 page, they're given a blank white page with the following text:
ERROR [UNKNOWN TYPE, ERRNO 404]: IN GET /sdf Line in Trace ===== SilverStripe\Dev\CliDebugView->renderTrace() DetailedErrorFormatter.php:119 SilverStripe\Logging\DetailedErrorFormatter->output(404, , , , ) DetailedErrorFormatter.php:54 SilverStripe\Logging\DetailedErrorFormatter->format(Array) HTTPResponse.php:355 SilverStripe\Control\HTTPResponse->outputBody() HTTPResponse.php:283 SilverStripe\Control\HTTPResponse->output() index.php:18
When an authenticated user views a 404 page it works perfectly.
Our workaround at the moment is to change the view permissions to "Anyone" in the CMS.
I'm not sure what the best fix is for this - always set canView to true and remove the CMS permissions?
The easy solution here would simply to ad a canview() { return true } to ErrorPage. I can't think of any scenario whereby either of those pages would require anything but that, though I may be wrong.
My workaround is a simple extension:
<?php/** * Make all ErrorPages visible regardless of site settings * */namespace {
useSilverStripe\CMS\Model\SiteTreeExtension;
class ErrorPageExtension extends SiteTreeExtension
{
publicfunctioncanView()
{
returntrue;
}
}
}
I'm not sure whether this is intentional or not, however when
Who can view pages on this site?
is set to either Logged-in users or "Only these groups" (ie: required permission), adev/build
will generate blank (0-byte)assets/error-(404|500).html
files.The text was updated successfully, but these errors were encountered: