Theme won't load, Twig Error

Created on 28 December 2020, over 4 years ago
Updated 12 February 2025, about 2 months ago

Problem/Motivation

When Intercept Base is installed and activated, the front of the website shows the message that the website is not available (this is on Pantheon). When I check the logs, I find:

Twig\Error\LoaderError: Template "@intercept-base-components/staff-management-menu/staff-management-menu.twig" is not defined in "themes/intercept_base/templates/page/page--user.html.twig" at line 1. in Twig\Loader\ChainLoader->getCacheKey() (line 142 of /code/vendor/twig/twig/src/Loader/ChainLoader.php).

The frontpage error disappears when I switch to a new theme.

Steps to reproduce

* Install and activate Intercept Base.
* See error on the frontend.
* Check the log.
* When I check the ChainLoader.php code at line 142, it says

throw new LoaderError(sprintf('Template "%s" is not defined%s.', $name, $exceptions ? ' ('.implode(', ', $exceptions).')' : ''));
}

πŸ› Bug report
Status

Closed: works as designed

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States Hanscraft

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΈπŸ‡°Slovakia coaston

    Hello I am experiencing the same issue now once I enabled this theme and navigated to front page - for the latest release:

    Twig\Error\LoaderError: Template "@intercept-base-components/more-link/more-link.twig" is not defined in "themes/contrib/intercept_base/templates/views/views-view.html.twig" at line 1. in Twig\Loader\ChainLoader->getCacheKey() (line 111 of vendor\twig\twig\src\Loader\ChainLoader.php).
    Twig\Environment->getTemplateClass('@intercept-base-components/more-link/more-link.twig', NULL) (Line: 204)
    Drupal\Core\Template\TwigEnvironment->getTemplateClass('@intercept-base-components/more-link/more-link.twig') (Line: 296)
    Twig\Template->loadTemplate('@intercept-base-components/more-link/more-link.twig', 'themes/contrib/intercept_base/templates/views/views-view.html.twig', 1) (Line: 45)
    __TwigTemplate_f74bde5336ebaccf21e1a8738381da67->doDisplay(Array, Array) (Line: 387)
    Twig\Template->yield(Array, Array) (Line: 343)
    Twig\Template->display(Array) (Line: 358)
    Twig\Template->render(Array) (Line: 35)
    Twig\TemplateWrapper->render(Array) (Line: 33)
    twig_render_template('themes/contrib/intercept_base/templates/views/views-view.html.twig', Array) (Line: 348)
    Drupal\Core\Theme\ThemeManager->render('views_view', Array) (Line: 491)
    Drupal\Core\Render\Renderer->doRender(Array) (Line: 504)
    Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 248)
    Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
    Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 638)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 239)
    Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 128)
    Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
    Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
    call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
    Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 186)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
    Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 116)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 90)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Production build 0.71.5 2024