Active
Project:
Drupal core
Version:
main
Component:
routing system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jun 2021 at 08:37 UTC
Updated:
4 Jun 2025 at 06:44 UTC
Jump to comment: Most recent
The InvalidArgumentException from "$this->aliasManager->getAliasByPath($path)" is left unhandled. So visiting invalid urls causes this subsystem to generate fatal errors.
Have any block setup with any visibility rule applying to the "Request Path" condition.
Visit https://yoursite.com/index.phpsometext
Catch the Exception
Review and apply patch.
None
None
None.
| Comment | File | Size | Author |
|---|---|---|---|
| block-path-visibility-exception-handling.patch | 957 bytes | weseze |
Comments
Comment #2
weseze commentedComment #8
mstrelan commentedConfirming I can reproduce the error with the steps to reproduce. What I don't understand is why anyone would go to a path like
/index.phpsometextand why Drupal handles it differently to/sometext. I don't think the RequestPath condition is the right place to handle this, seems like more of a routing issue.Comment #9
weseze commentedTo fill up the logs of a website with errors.
Or if you want to stay on top of errors and have those on a daily mail or sent through slack or some other platform, this becomes very annoying... Can't think of any legit reason to do so though.