Problem/Motivation
We had this issue on a website: UnexpectedValueException: External URLs do not have route parameters.
We only had this as anonymous user.
Turns out, someone had had removed the old homepage `/node/4` and created a redirect `/node/4` to the new homepage `/node/7` (Not the correct way, I know).
We should check whether the URL in `_prevent_homepage_deletion_check` is routed first, before accessing the route parameters.
Steps to reproduce
- Blank website with a homepage
- Remove the old homepage while keeping the basic site settings the same
- Set a redirect to a new homepage
- Every page on the site is broken, apart from /user/login
Proposed resolution
Commit patch (given in 1st comment), unless it needs refactoring/improvement
Remaining tasks
Commit patch (given in 1st comment), unless it needs refactoring/improvement
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3216723-url-should-check-whether-url-is-routed.patch | 660 bytes | randalv |
Comments
Comment #2
randalv commentedComment #3
joshahubbers commentedComment #4
joshahubbers commentedThank you RandalV! I applied the patch and will make a new release.