I have a situation (occured in v. 9.3.8), it looks like the “page_not_found” was accidentally deleted from the sitemap.
This is a multilingual site, but this should not matter.
I have restored the page with the “restore_core_components” add-on but that restored page does break the markup (no CSS) and the message that gets echoed through the $innerContent is actually adequate for “no permission” situation, not for a 404 situation.
Has anyone an idea how to get the page_not_found can be working properly again?
I did some DB investigation and the “Restore Core Component” did add a new Singlepage but there was two issues why it did not work in my case.
In the “Pages” table, the cInheritPermission" was set to “PARENT”, I have changed it to “OVERRIDE”.
In “PagePaths” table, the URL was set to the language section of my current user. After removing the language part of the slug, I got the 404 page back with its expected behaviour.
So anyone running into a similar issue, this fixes it.