Overriding error pages


I am trying to make the error pages of my website “pretty”; i’ve managed to identify a few different types of error pages:

Too large items; like http://dev.omeka.org/omeka-s-sandbox/s/tinbox/item/17900000 ; this is handled by the theme correctly

Items that don’t exist, like http://dev.omeka.org/omeka-s-sandbox/s/tinbox/item/joe ; thisis correct as well

Items with mixed numbers and letters, like http://dev.omeka.org/omeka-s-sandbox/s/tinbox/item/1790a ; this ends on a default error page thing

Inexistent pages, like http://dev.omeka.org/omeka-s-sandbox/s/tinbox/page/joe ; this is even more “raw”

For the last case, i’ve seen that index.php is dictating this behaviour, as this code is present

} catch (\Exception $e) {
    include OMEKA_PATH . '/application/view/error/fallback.phtml';

However, adding a /view/error/fallback.phtml file in my theme folder doesn’t handle it. What could i do ?


The “fallback” error in your last example, I don’t have the same experience, it’s just the normal site-level error like the first two.

The true fallback error is a totally unstyled page used just for when the error falls all the way through the application stack. There’s no way to theme it as it purposely has basically zero dependencies: it will always load the specific file application/view/error/fallback.phtml.

1 Like