Related with this fix #2750821: Site breaks when menu contains external pages, when the first link is external this error is thrown "External URLs do not have an internal route name"
I know it's a rare case - who will put an external link as 1st level element in a menu? :)

Comments

dragos.dumitrescu created an issue. See original summary.

dragos-dumi’s picture

dragos-dumi’s picture

Status: Active » Needs review
rphair’s picture

(deleting misleading comment)

rphair’s picture

Status: Needs review » Fixed

Not a trivial issue at all, maybe even a common case for microsites related to a parent on another domain. Thanks for catching this. Have committed to latest dev version (also riding in, trivial fixes to info.yml to accommodate drupal.org packaging script).

mian3010’s picture

Status: Fixed » Needs review
StatusFileSize
new990 bytes

The URL-class seems to be a bit confusing. A link can return FALSE for isExternal(), but still throw \UnexpectedValueException in getRouteName, as that is thrown based on the result of the unrouted-property.

I have attached a new patch that should fix this.

  • rphair committed 97f4dbe on 8.x-1.x authored by mian3010
    Issue #2816391 by dragos.dumitrescu, mian3010, rphair: Error when first...
rphair’s picture

Status: Needs review » Fixed

thanks, that does look more resilient. Checking into dev version for now (will be releasing beta2 version shortly).

Status: Fixed » Closed (fixed)

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