Enonic version: 7.7.2
OS: Ubuntu
Whenever I access a invalid path I don’t get the 404 error page (having or not the error handler - error.js)
This happens only when I have a HttpFilter enabled and the vhost set up:
It should be displaying the error page instead of the root page.
I can only conclude that HttpFilter have precedence over ErrorHandler, and somehow the error, if any, is swallowed and will be ignored.
The filter mapping in site.xml: (I tried many different patterns and matches but the problem still happens)
<mapping filter="/site/filters/filterError/index.js" order="10">
<match>valid:true</match>
</mapping>
The vhost entry: (the root path is the filtererror site)
mapping.site.host = localhost
mapping.site.source = /
mapping.site.target = /site/default/master/filtererror
My test data:
–
PS.: My page controller is just rendering the displayName of current content.
–
You can reproduce the error using the artifacts below:
Example project
Sandbox for example project