Custom Page Exception does not work for 404 error

Created on 7 June 2023, over 1 year ago
Updated 8 June 2023, over 1 year ago

Problem/Motivation

AccessPolicyExceptionHtmlSubscriber (priority: -25) class extends DefaultExceptionHtmlSubscriber (priority: -128).
That override impact on404() method and prevent calling CustomPageExceptionHtmlSubscriber::on404() which has priority: -50.

Steps to reproduce

  • Have access_policy enabled
  • Set custom error page in configuration
  • Open non-existing page
  • Default 404 message will be shown, and should be shown custom error page

Proposed resolution

Changing AccessPolicyExceptionHtmlSubscriber priority to lower is not an option because on403() method should be called before other subscribers.

As an option I've updated AccessPolicyExceptionHtmlSubscriber to extend CustomPageExceptionHtmlSubscriber instead of DefaultExceptionHtmlSubscriber

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡΅πŸ‡±Poland relim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024