Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#12 | fast_404-subscribe_notfound_exception-2930381-12.patch | 2.69 KB | gg4 |
#12 | interdiff--2930381-4-12.txt | 2.22 KB | gg4 |
#4 | fast_404-subscribe_notfound_exception-2930381-4.patch | 1.57 KB | sonnykt |
Comments
Comment #2
sonnyktComment #3
sonnyktComment #4
sonnyktThis patch lowers the priority of the listener so that it works if another module (eg. m4032404) changes the exception type to NotFoundHttpException.
Comment #5
gargsuchi CreditAttribution: gargsuchi at Salsa Digital for Department of Premier and Cabinet - Victoria, Australia commentedComment #6
sonnyktComment #7
sonnyktComment #8
gg4 CreditAttribution: gg4 commentedUnassigned since there is a patch to review.
Comment #9
gg4 CreditAttribution: gg4 commentedThis 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.
Comment #10
gg4 CreditAttribution: gg4 commentedComment #11
gg4 CreditAttribution: gg4 commentedThinking about this more, if we are not gating the mainonKernelRequest
event subscriber, probably not a reason to gateonNotFoundException
behind a$setting
.Comment #12
gg4 CreditAttribution: gg4 commentedComment #13
sonnyktComment #15
gg4 CreditAttribution: gg4 commented