Customize "Page Not Found" page


(Rocky Rocky) #1

Hi,

For Neos password protected pages. When the login session is expired, users get a “Page Not Found” page. How do I customise this to include a log in form?

Thanks!
Rocky


(Bastian Waidelich) #2

I didn’t test it yet, but I recently stumbled upon https://www.neos.io/download-and-extend/packages/sitegeist/sitegeist-movealong.html and it might help you


(Aske Ertmann) #3

You can use https://www.neos.io/download-and-extend/packages/moc/moc-notfound.html and point to “login” instead of “404” if you like.

However it can’t differentiate between the page actually not existing and when a page cannot be accessed due to restrictions. That would require some custom code to achieve. You could fork the package and add the logic to it.


(Bastian Waidelich) #4

FYI: The fact that inaccessible & non-existing behaves the same was done on purpose in order to prevent information disclosure. Working around that might have an impact on the security of your system


(Muhammad Tashfeen) #5

How exactly it can point to login ? I am also using the package but I want to point to the page with URL segment to /notfound and I am struggling with the settings.yaml

I have the following settings in my Project/Configuration/Settings.yaml
error:
exceptionHandler:
renderingGroups:
notFoundExceptions:
options:
variables:
path: ‘404-2’

Error -> No controller could be resolved which would match your request.