Site won't load after installing this module

Created on 11 December 2024, 10 months ago

Problem/Motivation

After installing this module on a fresh install of Drupal 11.0.9, all pages fail to load, with the following error shown:

The website encountered an unexpected error. Try again later.

Twig\Error\LoaderError: Template "@navigation/toolbar-button.html.twig" is not defined in "modules/contrib/navigation_extra/templates/navigation-extra-menu.html.twig" at line 25. in Twig\Loader\ChainLoader->getCacheKey() (line 111 of /var/www/html/vendor/twig/twig/src/Loader/ChainLoader.php).
Twig\Environment->getTemplateClass() (Line: 204)
Drupal\Core\Template\TwigEnvironment->getTemplateClass() (Line: 303)
Twig\Template->loadTemplate() (Line: 118)
__TwigTemplate_aa68b16d5de4192b3704a38173190e41->{closure}() (Line: 1967)
Twig\Extension\CoreExtension::captureOutput() (Line: 83)
__TwigTemplate_aa68b16d5de4192b3704a38173190e41->macro_menu_items() (Line: 1309)
Twig\Extension\CoreExtension::callMacro() (Line: 61)
__TwigTemplate_aa68b16d5de4192b3704a38173190e41->doDisplay() (Line: 393)
Twig\Template->yield() (Line: 349)
Twig\Template->display() (Line: 364)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 446)
Drupal\Core\Render\Renderer->doRender() (Line: 203)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 86)
__TwigTemplate_e60a6eb003bb9982739130503ad9386f->block_content() (Line: 437)
Twig\Template->yieldBlock() (Line: 69)
__TwigTemplate_e60a6eb003bb9982739130503ad9386f->doDisplay() (Line: 393)
Twig\Template->yield() (Line: 349)
Twig\Template->display() (Line: 364)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 446)
Drupal\Core\Render\Renderer->doRender() (Line: 459)
Drupal\Core\Render\Renderer->doRender() (Line: 203)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 131)
__TwigTemplate_8d5dea704077bd8c9d56281da4343792->doDisplay() (Line: 393)
Twig\Template->yield() (Line: 349)
Twig\Template->display() (Line: 364)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 446)
Drupal\Core\Render\Renderer->doRender() (Line: 459)
Drupal\Core\Render\Renderer->doRender() (Line: 459)
Drupal\Core\Render\Renderer->doRender() (Line: 203)
Drupal\Core\Render\Renderer->render() (Line: 484)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 87)
__TwigTemplate_960d48ff0eac652c52c62539765bd8f4->doDisplay() (Line: 393)
Twig\Template->yield() (Line: 349)
Twig\Template->display() (Line: 364)
Twig\Template->render() (Line: 35)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 446)
Drupal\Core\Render\Renderer->doRender() (Line: 203)
Drupal\Core\Render\Renderer->render() (Line: 158)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 593)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 153)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray() (Line: 246)
Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() (Line: 206)
Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (Line: 56)
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (Line: 188)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)

Proposed resolution

It's possible the current code expects a twig template that is only present in more recent versions of of the navigation module. If that is the case, an appropriate composer constraint would be helpful.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada mandclu

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mandclu
  • 🇧🇪Belgium kriboogh

    Temporarly fixed by fixing the settings form with the new create parameters and using the same template as the core module. Should be looked at properly to make this module up-to-date to the latest core version.

  • Status changed to Needs work 8 months ago
  • 🇧🇪Belgium wouter.h

    After installation I get the following error on Drupal 10.3.8;

    Twig\Error\LoaderError: Template “navigation:toolbar-button” is not defined in “modules/contrib/navigation_extra/templates/navigation-extra-menu.html.twig” at line 45. in Twig\Loader\ChainLoader->getCacheKey() (line 111 of /var/www/html/vendor/twig/twig/src/Loader/ChainLoader.php).

  • 🇧🇪Belgium kriboogh

    Fixed in the latest dev.

Production build 0.71.5 2024