Drupal\gin\GinNavigation->getNavigationActiveTrail
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3542079. -->
Reported by: [cosmicdreams](https://www.drupal.org/user/42579)
Related to !661
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>It turns out that GinNavigation can arrive in a failure state if the derived route is weird. I get this error:</p>
<p>UnexpectedValueException: Unrouted URIs do not have internal representations. in Drupal\Core\Url->getInternalPath() (line 789 of core/lib/Drupal/Core/Url.php).<br>
Drupal\gin\GinNavigation->getNavigationActiveTrail() (Line: 87)<br>
gin_toolbar_preprocess_html() (Line: 369)<br>
Drupal\Core\Extension\ModuleHandler->invoke() (Line: 304)<br>
Drupal\Core\Theme\ThemeManager->render() (Line: 497)<br>
Drupal\Core\Render\Renderer->doRender() (Line: 227)<br>
Drupal\Core\Render\Renderer->render() (Line: 162)<br>
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 627)<br>
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 157)<br>
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)<br>
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() (Line: 246)<br>
Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() (Line: 206)<br>
Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (Line: 56)<br>
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (Line: 188)<br>
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)<br>
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)<br>
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)<br>
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)<br>
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 48)<br>
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)<br>
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)<br>
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)<br>
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 715)<br>
Drupal\Core\DrupalKernel->handle() (Line: 19)</p>
<p>I think the combination of Site Studio 8, the gin theme and sitestudio_gin is the reason why we have arrived in this condition.</p>
issue