Twig\Error\LoaderError: Template "modules/contrib/betterlt/templates/block/.html.twig" is not defined

Created on 1 September 2021, about 3 years ago
Updated 23 March 2023, over 1 year ago

Problem/Motivation

After installation (which is confusing because the module name is different from the project name) on drupal 8.9.18 I get a WSOD with:

The website encountered an unexpected error. Please try again later.

Twig\Error\LoaderError: Template "modules/contrib/betterlt/templates/block/.html.twig" is not defined. in Twig\Loader\ChainLoader->getCacheKey() (line 26 of themes/contrib/enzian/src/components/pages/page/page.html.twig).
Twig\Environment->getTemplateClass('modules/contrib/betterlt/templates/block/.html.twig', NULL) (Line: 143)
Drupal\Core\Template\TwigEnvironment->getTemplateClass('modules/contrib/betterlt/templates/block/.html.twig') (Line: 445)
Twig\Environment->loadTemplate('modules/contrib/betterlt/templates/block/.html.twig') (Line: 64)
twig_render_template('modules/contrib/betterlt/templates/block/.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('block', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 444)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 501)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 117)
__TwigTemplate_b32cf177a2e21d7103e64d0596c8ea78be3796231a8965e9e0833bf597313d7a->block_header(Array, Array) (Line: 216)
Twig\Template->displayBlock('header', Array, Array) (Line: 61)
__TwigTemplate_b32cf177a2e21d7103e64d0596c8ea78be3796231a8965e9e0833bf597313d7a->doDisplay(Array, Array) (Line: 455)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 422)
Twig\Template->display(Array) (Line: 434)
Twig\Template->render(Array) (Line: 64)
twig_render_template('themes/contrib/enzian/src/components/pages/page/page.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('page', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 501)
Drupal\Core\Template\TwigExtension->escapeFilter(Object, Array, 'html', NULL, 1) (Line: 108)
__TwigTemplate_46d66b6c110fdc391213910ca5ce6092764383a8864863ca7d4e6e8cf7dc955b->doDisplay(Array, Array) (Line: 455)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 422)
Twig\Template->display(Array) (Line: 434)
Twig\Template->render(Array) (Line: 64)
twig_render_template('sites/default/files/twig_ui/enzian/html.html.twig', Array) (Line: 384)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 200)
Drupal\Core\Render\Renderer->render(Array) (Line: 147)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 573)
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)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 708)
Drupal\Core\DrupalKernel->handle(Object) (Line: 31)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

1.3

Component

Code

Created by

🇩🇪Germany anruether Bonn

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.

Production build 0.71.5 2024