Twig\Error\LoaderError: Template "@organisms/list/list.twig" is not defined

Created on 27 February 2024, about 1 year ago
Updated 14 April 2024, 12 months ago

I just set up one site for our lab using tripal which is based on Drupal10.2, and after searching I found civictheme is the most suitable theme for our site , but when I installed the them and open the site it shows this error. is there anyone can help on this ? thank a lot.

The website encountered an unexpected error. Try again later.

Twig\Error\LoaderError: Template "@organisms/list/list.twig" is not defined in "themes/civictheme/templates/views/views-view.html.twig" at line 7. in Twig\Loader\ChainLoader->getCacheKey() (line 99 of /var/www/drupal/vendor/twig/twig/src/Loader/ChainLoader.php).
Twig\Environment->getTemplateClass('@organisms/list/list.twig', NULL) (Line: 204)
Drupal\Core\Template\TwigEnvironment->getTemplateClass('@organisms/list/list.twig') (Line: 319)
Twig\Template->loadTemplate('@organisms/list/list.twig', 'themes/civictheme/templates/views/views-view.html.twig', 7) (Line: 43)
__TwigTemplate_5df16393543d73f280cff7c08c20c5f2->doDisplay(Array, Array) (Line: 394)
Twig\Template->displayWithErrorHandling(Array, Array) (Line: 367)
Twig\Template->display(Array) (Line: 379)
Twig\Template->render(Array) (Line: 38)
Twig\TemplateWrapper->render(Array) (Line: 39)
twig_render_template('themes/civictheme/templates/views/views-view.html.twig', Array) (Line: 348)
Drupal\Core\Theme\ThemeManager->render('views_view', Array) (Line: 480)
Drupal\Core\Render\Renderer->doRender(Array) (Line: 493)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 240)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 627)
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: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->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: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

πŸ’¬ Support request
Status

Closed: cannot reproduce

Version

1.6

Component

Code

Created by

πŸ‡¨πŸ‡³China linsen_hou

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

Comments & Activities

  • Issue created by @linsen_hou
  • Assigned to fionamorrison23
  • Hi @linsen_hou,
    Is there some more detailed information you can provide here?
    Can you please specifically outline the steps to reproduce this issue?
    Thanks.

  • πŸ‡¨πŸ‡³China linsen_hou

    hi fiona, below are the steps:
    1. setup the tripal site using docker(Tripal 4.x-dev on Drupal 10.2.x-dev);
    2. download the CivicTheme and uploaded it through the admin panel;
    3. install the required module such as components/webform and so on;
    4. set the CivicTheme as the default theme;
    5. visit the site and it shows the error;
    It looks like some structure in tripal is not compatiable with CivicTheme? I'm not familar with Drupal now, have no idea how to solve this error. Thanks for helping on this.

  • πŸ‡ΊπŸ‡ΈUnited States spficklin

    Tripal developer here....

    For Tripal v4 we don't yet have the views integration fully vetted. I suspect given the error message you're getting, namedly:

    Twig\Error\LoaderError: Template "@organisms/list/list.twig" is not defined in "themes/civictheme/templates/views/views-view.html.twig" at line 7. in Twig\Loader\ChainLoader->getCacheKey() (line 99 of /var/www/drupal/vendor/twig/twig/src/Loader/ChainLoader.php).

    That the civictheme is learning something about the "organism" content type and expect there to be a twig template for it? Not entirely sure. Can you add this issue to our Github issue queue and we can help you deal with it there: https://github.com/tripal/tripal/issues

  • πŸ‡¨πŸ‡³China linsen_hou

    Thanks @spficklin. I've post the issue to Tripal Github issue queue.

    @fiona, is it possible that CivicTheme ignore the other content type ? in order to using CivicTheme in Tripal. ^_^

  • Status changed to Postponed: needs info about 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia alex.skrypnyk Melbourne

    `@organisms` is not a content type - it is a namespace for the Components module. This has to be specified in your active theme's `.info` file.

    From the provided output it is hard to understand why this happen on your site.

    Have you tried to clear the cache?

  • πŸ‡ΊπŸ‡ΈUnited States spficklin

    Oh, I see why this is confusing. In Tripal we do have a content type for organisms (taxonomic species). We were able to get the civictheme working on Drupal 10.2 but not on Drupal's development branch.

  • πŸ‡¦πŸ‡ΊAustralia alex.skrypnyk Melbourne

    @spficklin

    We were able to get the civictheme working on Drupal 10.2 but not on Drupal's development branch.

    Could you please provide more information about what is not working on the "Drupal's development branch" (and also what that branch is exactly).

  • πŸ‡ΊπŸ‡ΈUnited States spficklin

    I'll defer to @linsen_hou to respond to which "dev" branch they were using. I justed tested it on 10.2 and all was good. @linsen_hou told me that when they downgraded to the 10.2 branch (from a Drupal dev branch) that it too was working for them. I suspect it was the 10.2.x branch of Drupal (https://git.drupalcode.org/project/drupal/-/tree/10.2.x?ref_type=heads)

  • πŸ‡¨πŸ‡³China linsen_hou

    sorry reply late.
    The drupal version which met this issus is 10.2.4-dev.

  • Status changed to Closed: cannot reproduce 12 months ago
  • πŸ‡¦πŸ‡ΊAustralia alex.skrypnyk Melbourne

    Thank you for providing information.

    We tested this with multiple versions of Drupal (and we have CI that tests all changes on every commit) and could not reproduce this.

    I'm closing this for now. Please feel free to re-open if the issue appears again.

  • I am also having this same problem, very easy to reproduce.

Production build 0.71.5 2024