Currently, Fast404 only listens to KernelRequest event. If a user hits a valid path, but another module intervenes and returns a NotFoundHttpException exception (eg. m4032404 module), the native Drupal 404 page is returned instead of the Fast404 page.

Fast404 Event subscriber should also listen to the NotFoundHttpException event to completely replace Drupal 404 page.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sonnykt created an issue. See original summary.

sonnykt’s picture

sonnykt’s picture

Issue summary: View changes
sonnykt’s picture

This patch lowers the priority of the listener so that it works if another module (eg. m4032404) changes the exception type to NotFoundHttpException.

gargsuchi’s picture

Status: Active » Needs review
sonnykt’s picture

Version: 8.x-1.0-alpha2 » 8.x-1.x-dev
sonnykt’s picture

gg4’s picture

Assigned: sonnykt » Unassigned

Unassigned since there is a patch to review.

gg4’s picture

Status: Needs review » Reviewed & tested by the community

This seems like really nice improvement. Thinking about this, we probably should gate this behind a new setting, as is the precedent for the other features of this module.

gg4’s picture

Status: Reviewed & tested by the community » Needs work
gg4’s picture

Status: Needs work » Reviewed & tested by the community

Thinking about this more, if we are not gating the main onKernelRequest event subscriber, probably not a reason to gate onNotFoundException behind a $setting.

gg4’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
2.22 KB
2.69 KB
sonnykt’s picture

Status: Needs review » Reviewed & tested by the community

  • bonus committed 8eee40f on 8.x-1.x authored by sonnykt
    Issue #2930381 by sonnykt, bonus: Subscribe to NotFoundHttpException...
gg4’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.