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

  1. Blank website with a homepage
  2. Remove the old homepage while keeping the basic site settings the same
  3. Set a redirect to a new homepage
  4. 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

Comments

RandalV created an issue. See original summary.

randalv’s picture

joshahubbers’s picture

Status: Active » Fixed
joshahubbers’s picture

Thank you RandalV! I applied the patch and will make a new release.

Status: Fixed » Closed (fixed)

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