ID was not an accessible page - on hidden pages although the 404 error handler is configured in the site config
On pages that are configured "hidden" in the page properties users get a "Page Not Found Reason: ID was not an accessible page" error except getting the configured 404 error page.
In the site config we have something like:
errorHandling: - errorCode: '404' errorHandler: Page errorContentSource: 't3://page?uid=22'
So the error handler is configured correctly. But on hidden pages it is not thrown correctly. For pages that do really not exist the correct error page is shown. (ID 22)
Is it our configuration error or is it a bug?
Updated by Riccardo De Contardi almost 2 years ago
I performed a test with 9.5.11
1) The site configuration config.yaml contains (relevant part):
errorHandling: - errorCode: '404' errorHandler: Page errorContentSource: 't3://page?uid=51' - errorCode: '403' errorHandler: Page errorContentSource: 't3://page?uid=52'
2) I created a page, set it to hidden
3) With a different browser (incognito mode) , I tried to access the hidden page
The 403 page is shown.
If I remove the setting about 403 error in the config.yaml file I get the error:
Page Not Found Reason: ID was not an accessible page
The 404 page should be shown
When using a different setting on point 2):
2) I created a page, set its "start date" to the future
the result is the same.