Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
After update from 'superfish-8.x-1.0-rc2+13-dev' to 'superfish-8.x-1.0-rc3', I get a HTTP 500 Internal Server Error whenever I visit my website. The Apache error log shows entries like this:
[Sat Nov 05 14:42:19.415110 2016] [lsapi:notice] [pid 528614] [client {anonymized ip}:54136] [host {anonymized host}] Backend log: Uncaught PHP Exception UnexpectedValueException: "External URLs do not have an internal route name." at /home/{anonymized_path}/public_html/core/lib/Drupal/Core/Url.php line 554\n
I'm using Drupal 8.2.1.
Comment | File | Size | Author |
---|---|---|---|
#15 | fixInternalLinks-2825106-15.patch | 829 bytes | amatzies |
Comments
Comment #2
dhendriks CreditAttribution: dhendriks commentedAfter restoring the previous version, I can now again access the Drupal log. It shows entries for the following:
UnexpectedValueException: External URLs do not have an internal route name. in Drupal\Core\Url->getRouteName() (line 554 of /home/{anonymized_path}/public_html/core/lib/Drupal/Core/Url.php).
Comment #3
abx CreditAttribution: abx commentedSame error here with 1.0rc3, so, tried to use 1.0rc2 but didn't work with error -> "Not supported
The Superfish library requires an update. You can find the update instructions on http://drupal.org/project/superfish."
Comment #4
dhendriks CreditAttribution: dhendriks commentedI had the same issue with the library location. README says put it in 'sites/all/libraries/superfish/*', but that didn't work for me either with rc3. I put it in 'libraries/superfish/*' instead. That fixed the issue for me. Maybe we should create another issue for that...
Comment #5
Q2U CreditAttribution: Q2U commentedMy /admin/reports/status reported that the "Superfish libraby not installed" when the library has in fact been uploaded to as the 'sites/all/libraries/superfish/' directory as the README directs.
Uploading the Superfish library to 'libraries/superfish/' instead (as dhendricks suggested) has resolved this issue for me.
Thank you dhendricks.
Comment #6
dhendriks CreditAttribution: dhendriks commentedJust to be clear. This issue (2825106) is not about that problem. I created #2825179: Issue with library location for 8.x-1.0-rc3 for that issue (the one from comments #3, #4, and #5). I already applied the solution from #2825179: Issue with library location for 8.x-1.0-rc3 to my installation, solving that issue.
This issue (2825106) is caused by a later commit than the other one (2825179). This issue (2825106) must have been caused by either commit 70ddc34 or commit d130999.
Comment #7
hugotrovao CreditAttribution: hugotrovao commentedI can confirm the same problem with Drupal 8.2.2:
...
Comment #8
Jonah Fenn CreditAttribution: Jonah Fenn commentedI'm encountering this error as well.
It's intermittent - I can get in, configure the menu, see it working and interact with it, but then, usually when I reload the page, I get a 500 error.
Comment #9
hitfactory CreditAttribution: hitfactory commentedThe problem is with this commit http://cgit.drupalcode.org/superfish/commit/?id=d130999 which checks whether a link is external and also attempts to fetch a route name together. Please test my latest patch (#10) over here.
https://www.drupal.org/node/2784021#comment-11768284
Comment #10
Anonymous (not verified) CreditAttribution: Anonymous at Netuxo Ltd (RIP) commentedWe updated to superfish-8.x-1.0-rc4 and Drupal core-8.2.1 and still encounter the UnexpectedValueException: External URLs do not have an internal route name. in Drupal\Core\Url->getRouteName() (line 554 of core/lib/Drupal/Core/Url.php). error.
The entire trace is this:
template_preprocess_superfish_menu_items(Array, 'superfish_menu_items', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('superfish_menu_items', Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 474)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 52)
__TwigTemplate_948ba6df08a44d9b725540d21b5921a6caeef161d0b02ba594d42451f9bb19a0->doDisplay(Array, Array) (Line: 381)
Twig_Template->displayWithErrorHandling(Array, Array) (Line: 355)
Twig_Template->display(Array) (Line: 366)
Twig_Template->render(Array) (Line: 64)
twig_render_template('modules/superfish/templates/superfish.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('superfish', Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 448)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 474)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 82)
__TwigTemplate_a85b45bbcbb6a31e98ed47a9ebde4d62f2f071b1277e7558fb2bb97c3f3d1847->block_content(Array, Array) (Line: 167)
Twig_Template->displayBlock('content', Array, Array) (Line: 71)
__TwigTemplate_a85b45bbcbb6a31e98ed47a9ebde4d62f2f071b1277e7558fb2bb97c3f3d1847->doDisplay(Array, Array) (Line: 381)
Twig_Template->displayWithErrorHandling(Array, Array) (Line: 355)
Twig_Template->display(Array) (Line: 366)
Twig_Template->render(Array) (Line: 64)
twig_render_template('themes/ourcustomthemename/templates/block/block.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('block', Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 448)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 474)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 47)
__TwigTemplate_6893256bfcf24b91cb883424db92072de194882c52bff6fccc79dc0625de4453->doDisplay(Array, Array) (Line: 381)
Twig_Template->displayWithErrorHandling(Array, Array) (Line: 355)
Twig_Template->display(Array) (Line: 366)
Twig_Template->render(Array) (Line: 64)
twig_render_template('themes/ourcustomthemename/templates/layout/page--front.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 474)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 120)
__TwigTemplate_7b5eed397937fa54f1f1463137faa4680b18d516b2a6c5f3573d664329a371ee->doDisplay(Array, Array) (Line: 381)
Twig_Template->displayWithErrorHandling(Array, Array) (Line: 355)
Twig_Template->display(Array) (Line: 366)
Twig_Template->render(Array) (Line: 64)
twig_render_template('themes/ourcustomthemename/templates/html.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 435)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 147)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 148)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 144)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 62)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 207)
Drupal\page_cache\StackMiddleware\PageCache->fetch(Object, 1, 1) (Line: 121)
Drupal\page_cache\StackMiddleware\PageCache->lookup(Object, 1, 1) (Line: 75)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 652)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Comment #11
Jonah Fenn CreditAttribution: Jonah Fenn commentedRC4 appears to have fixed the issue for me.
I'm using core 8.2.2
Thanks for addressing this so quickly!
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous at Netuxo Ltd (RIP) commentedWe are actually also on 8.2.2. Did drush cache-rebuild and core-cron to make sure all menus have been rebuilt, but the problem persists.
Comment #13
hugotrovao CreditAttribution: hugotrovao at SIMBIOSE commentedFixed. Thank you!
I'm using superfish 8.x-1.0-rc4 and Drupal 8.2.2.
Note: To users still experiencing problems, I had some problems clearing cache/browser cache before I actually got it working.
Comment #14
dhendriks CreditAttribution: dhendriks commentedFor those of you who think 8.x-1.0-rc4 fixes this issue, it doesn't. You are probably experiencing a different HTTP 500 Internal Server Error, namely the one from #2825179: Issue with library location for 8.x-1.0-rc3. Let's try to keep the two issues separate.
Comment #15
amatzies CreditAttribution: amatzies commentedI am facing this error if I use a menu item link which is neither external nor is routed. A check like
$menu_item->link->getUrlObject()->isRouted() !== FALSE
fixes the error in my case.Comment #16
amatzies CreditAttribution: amatzies commentedComment #17
snsblvd CreditAttribution: snsblvd commentedI do have the same error. Updating FROM 8.x-1.0-rc2 TO 8.x-1.0-rc4 gives me:
UnexpectedValueException: External URLs do not have an internal route name. in Drupal\Core\Url->getRouteName() (line 554 of core/lib/Drupal/Core/Url.php).
The patch from #15 to fix the iusse, I can access my dev site again.
Comment #18
hugotrovao CreditAttribution: hugotrovao at SIMBIOSE commentedOK, to make it work I had to go to http://my.website/admin/config/development/performance and clear the cache (I was already logged in before the upgrade. I don't now if it works if having to login).
Weird thing it works like I described, but it doesn't work using "drush cr". Can it be related to caching?
Comment #19
RedEight CreditAttribution: RedEight at 95Visual commentedI can confirm that #15 was needed. Clearing the cache via all methods did not fix the issue.
Comment #20
Anonymous (not verified) CreditAttribution: Anonymous at Netuxo Ltd (RIP) commentedBefore trying again - @RedEight and @htm, do you comments apply to after applying the patch from #15? In which case, I should be logged in and on the respective admin page before upgrading the module via drush?
Comment #21
dhendriks CreditAttribution: dhendriks commentedIf such a clearing of cache is required, maybe the module update should clear the cache automatically? But first confirm it is really required, I guess...
Comment #22
dhendriks CreditAttribution: dhendriks commentedTested the patch from #15 on top of 8.x-1.0-rc4, and it works. Forgot to test without clearing the cache, oops... But with clearing the cache it works.
Comment #23
Yzmir Ramirez CreditAttribution: Yzmir Ramirez commentedSo to be clear its line modules/superfish/superfish.theme.inc on line 140 that is causing this issue. Will @amatzies patch in #15 be in the next RC? /crossfingers
Comment #24
DuaelFrThe patch in #15 works and looks good.
Comment #25
ehanuise CreditAttribution: ehanuise commentedHad a similar issue in 8.x-1.0-rc5 with D 8.2.3:
I made site update/upgrade, then worked OK in English but as soon as I switched to french, error page and this log error:
UnexpectedValueException: External URLs do not have an internal route name. in Drupal\Core\Url->getRouteName() (line 554 of /home/XXXXXXXXXXX/core/lib/Drupal/Core/Url.php).
#15 fixed it.
Comment #26
Didier Misson CreditAttribution: Didier Misson as a volunteer commentedSame problem...
and patch #15 is ok for me !
Thanks.
Comment #27
JayKandariAfter a lot of headscratching. Found this thread #15 Worked for me.
Superfish version = rc5 ;
Drupal core = 8.2.3
Comment #28
dhendriks CreditAttribution: dhendriks commentedCan we get this committed and rol out an rc6 release?
Comment #29
bbu23 CreditAttribution: bbu23 commentedPatch from #15 worked for me also !
Comment #30
pjbmob CreditAttribution: pjbmob commentedJust implemented the fix in #15 with success. Using the superfish menu with the Mayo theme.
Comment #31
RedEight CreditAttribution: RedEight at 95Visual commentedI updated a number of sites from superfish 8.x-1.0-rc4 with #15 patch to 8.x-1.0-rc5. After each update, the problem immediately resurfaced. I grabbed the patch from #15 and it applied and fixed the problem. Highly recommend that this be addressed or included in rc6.
Comment #33
DuaelFrIt seems that this patch has been commited
Comment #35
JoshOrndorff CreditAttribution: JoshOrndorff commentedThis fix is indeed committed, but as of 21 January, it is only in the dev version, not the latest release, rc5. So if you're hitting this bug, use the -dev version.
Comment #36
dhendriks CreditAttribution: dhendriks commentedPatch is included in rc6 though, see https://www.drupal.org/project/superfish/releases/8.x-1.0-rc6