HttpFilter swallowing 404 error

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">

The vhost entry: (the root path is the filtererror site) = localhost = / = /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

1 Like

Doesn’t sound very unlike last years bug,, perhaps it wasn’t really fixed?

1 Like

The fix for this is coming in XP 7.8 this month.