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.

CommentFileSizeAuthor
#15 fixInternalLinks-2825106-15.patch829 bytesamatzies
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dhendriks created an issue. See original summary.

dhendriks’s picture

After 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).

abx’s picture

Same 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."

dhendriks’s picture

I 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...

Q2U’s picture

dhendricks wrote: I 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...

My /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.

dhendriks’s picture

Uploading the Superfish library to 'libraries/superfish/' instead (as dhendricks suggested) has resolved this issue for me.

Just 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.

hugotrovao’s picture

I can confirm the same problem with Drupal 8.2.2:

UnexpectedValueException: External URLs do not have an internal route name. in Drupal\Core\Url->getRouteName() (line 554 of core/lib/Drupal/Core/Url.php).
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_dff4ff19507999f919575f89ecbbafd0e77927cb6245e26622a60b41ad33243b->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)

...

Jonah Fenn’s picture

I'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.

hitfactory’s picture

The 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

Anonymous’s picture

We 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)

Jonah Fenn’s picture

RC4 appears to have fixed the issue for me.

I'm using core 8.2.2

Thanks for addressing this so quickly!

Anonymous’s picture

We 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.

hugotrovao’s picture

Fixed. 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.

dhendriks’s picture

For 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.

amatzies’s picture

I 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.

amatzies’s picture

Status: Active » Needs review
snsblvd’s picture

I 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.

hugotrovao’s picture

OK, 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?

RedEight’s picture

I can confirm that #15 was needed. Clearing the cache via all methods did not fix the issue.

Anonymous’s picture

Before 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?

dhendriks’s picture

If 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...

dhendriks’s picture

Tested 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.

Yzmir Ramirez’s picture

So 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

DuaelFr’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #15 works and looks good.

ehanuise’s picture

Had 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.

Didier Misson’s picture

Same problem...
and patch #15 is ok for me !

Thanks.

JayKandari’s picture

After a lot of headscratching. Found this thread #15 Worked for me.
Superfish version = rc5 ;
Drupal core = 8.2.3

dhendriks’s picture

Can we get this committed and rol out an rc6 release?

bbu23’s picture

Patch from #15 worked for me also !

pjbmob’s picture

Just implemented the fix in #15 with success. Using the superfish menu with the Mayo theme.

RedEight’s picture

I 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.

  • mehrpadin committed a6de40f on 8.x-1.x authored by amatzies
    Issue #2825106 by amatzies: Fixed the URL route check for the active-...
DuaelFr’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -500 internal server error

It seems that this patch has been commited

Status: Fixed » Closed (fixed)

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

JoshOrndorff’s picture

This 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.

dhendriks’s picture