I get the following error if I add a external link to the main navigation. i.e. https://www.example.com
"The website encountered an unexpected error. Please try again later."
The error log shows the following error.
Type: php
Location: /node
Referrer: /admin/structure/menu/manage/main
Message: UnexpectedValueException: External URLs do not have an internal route name. in Drupal\Core\Url->getRouteName() (line 555 of /core/lib/Drupal/Core/Url.php).
Severity: Error
Notes:
- Drupal 8.4: External menu links work with Bartik and Bootstrap themes, broken in AT.
- Drupal 8.2.8 External menu links work fine with AT
Site Info
Drupal: 8.4.0
Web Server: Apache/2.4.17 (Unix) OpenSSL/1.0.1h mod_fcgid/2.3.9
PHP Version: 7.0.14
Memory limit: 256M
Database Version: MySQL
Comments
Comment #2
jwkovell CreditAttribution: jwkovell commentedTo further narrow down the issue a little more, I can confirm that Adaptive Theme on Drupal 8.3.7 does work when using external links in the menu.
The problem must be newer than that (or some other factor we haven't considered).
Comment #3
Bwolf CreditAttribution: Bwolf commentedJust created a clean install of Drupal 8.4. with adaptive theme and AT Tools only still broken.
Modules: AT Tools 8.x-2.0+6-dev (2017-Sep-02)
Themes: Adaptive Theme: 8.x-2.0+16-dev (2017-Sep-02)
Drupal: 8.4.0
Web Server: Apache/2.4.17 (Unix) OpenSSL/1.0.1h mod_fcgid/2.3.9
PHP Version: 7.0.14
Memory limit: 256M
Database Version: MySQL
Comment #4
Jeff Burnz CreditAttribution: Jeff Burnz commentedAssigning to myself. Cheers!
Comment #7
Jeff Burnz CreditAttribution: Jeff Burnz commentedOK, this came from an addition to support the
<nolink>
route_name feature.I've had to update the
menu.html.twig
template so if you have that in your theme you'll need to update it.Comment #8
Jeff Burnz CreditAttribution: Jeff Burnz commentedShould be fixed.
Comment #10
HitbyHi,
Could you please advise how to fix this?
I've created a new menu with four external links in. Adding the menu block to my site gives me
The website encountered an unexpected error. Please try again later.
with the following php error in the log
UnexpectedValueException: External URLs do not have an internal route name. in Drupal\Core\Url->getRouteName() (line 555 of /home/ACCOUNT/core/lib/Drupal/Core/Url.php).
I'm running a sub theme with Base: at_core (8.x-2.0+16-dev) and At Tools 8.x-2.0+8-dev
Thanks,
Comment #11
HitbyIgnore me,
I updated the theme but needed to copy menu.html.twig to my sub theme as well.