Template "artisan:views" is not defined in views-view.html.twig

Created on 14 January 2025, 4 months ago

Problem/Motivation

Template "artisan:views" is not defined in views-view.html.twig

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

Twig\Error\LoaderError: Template "artisan:views" is not defined in "themes/contrib/artisan/artisan_starterkit/templates/views/views-view.html.twig" at line 1. in Twig\Loader\ChainLoader->getCacheKey() (line 99 of C:\xampp-\htdocs\drupal-10\vendor\twig\twig\src\Loader\ChainLoader.php).
Twig\Environment->getTemplateClass('artisan:views', NULL) (Line: 204)
Drupal\Core\Template\TwigEnvironment->getTemplateClass('artisan:views') (Line: 319)
Twig\Template->loadTemplate('artisan:views', 'themes/contrib/artisan/artisan_starterkit/templates/views/views-view.html.twig', 1) (Line: 131)
__TwigTemplate_7450442232809a0d3035cc89dac8cc44___1819314042->doDisplay(Array, Array) (Line: 394)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 367)
Twig\Template->display(Array) (Line: 39)
__TwigTemplate_7450442232809a0d3035cc89dac8cc44->doDisplay(Array, Array) (Line: 394)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 367)
Twig\Template->display(Array) (Line: 379)
Twig\Template->render(Array, Array) (Line: 40)
Twig\TemplateWrapper->render(Array) (Line: 53)
twig_render_template('themes/contrib/artisan/artisan_starterkit/templates/views/views-view.html.twig', Array) (Line: 372)
Drupal\Core\Theme\ThemeManager->render('views_view', Array) (Line: 445)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 458)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 204)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 592)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 231)
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: 58)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
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: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

  • Install the theme.
  • Set the theme as the default.
  • Go to the home page and observe the error.
  • Refer to the attached screenshot for further clarification.

Proposed resolution

Fix the error.

🐛 Bug report
Status

Active

Version

1.2

Component

Code

Created by

🇮🇳India abhiyanshu

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

Comments & Activities

  • Issue created by @abhiyanshu
  • Thanks for the insterest on Artisan theme @abhiyanshu!

    Can you please confirm that you followed these installation steps?: https://git.drupalcode.org/project/artisan/-/blob/1.2.2/README.md?ref_ty...
    So that you have generated your own subtheme, serialization, artisan & artisan_SUBTHEME (your subtheme) are enabled & last as default? Also that artisan_starterkit is not enabled as in only used as starterkit. Specially using artisan drush command that does everything automated when possible.

    Also note that 1.2.2 has views SDC component so problem may be solved just by clearing cache in that scenario:
    https://git.drupalcode.org/project/artisan/-/blob/1.2.2/artisan_starterk...
    https://git.drupalcode.org/project/artisan/-/blob/1.2.2/components/views...

    Unable to reproduce the error for now, please include further information like core version you used.

  • Status changed to Postponed: needs info 19 days ago
  • 🇺🇸United States TolstoyDotCom L.A.

    I'm using 10.4.6 and I have the same problem. I'm trying several themes and I did composer require 'drupal/artisan:^2.0@alpha'. On admin/appearance it says the serialization module was required so I enabled that using drush and then reloaded the page and set the theme as default. When I loaded a webform I got the error message above.

    I didn't follow the README instructions, I was just trying a bunch of themes. So you may or may not consider this an issue. However, composer issues are bad enough, npm and similar are far worse. So, while I'd like to check out the theme I think I'll find something else.

Production build 0.71.5 2024