Twig error when using a pattern in an admin theme

Created on 3 May 2023, almost 2 years ago

We noticed that with the recent UI Patterns version we are getting error 500 some times from the admin theme when creating content.

The error is following:

Twig\Error\LoaderError: Template "@templates/one-column/one_column.twig" is not defined in "modules/contrib/ui_patterns/templates/patterns-use-wrapper.html.twig" at line 9. funktiossa Twig\Loader\ChainLoader->getCacheKey() (rivi 98 tiedostossa /var/www/html/builds/2023-05-02.14-44-34.tag--2023-05-02__46e25145/vendor/twig/twig/src/Loader/ChainLoader.php).

There were a few related issues which were showing a similar error but not completely similar. The other similar errors seem to be related to UI Pattern Library and a child theme but in our case the error happens when we are using the admin theme and the pattern is defined in the main public theme.

Our use case is that in the admin panel we are also using the UI Patterns Field Formetter to display some fields with a pattern. Sometimes when you are adding multiple paragraphs in the page, there is an error 500 in the Network tab which gives the error message shown above.

I originally thought this might be a Paragraphs error because the bug was mostly happening when we were adding a paragraph with a pattern. There is a more complete description what happens when we are adding a new paragraph but today we noticed that the Ajax call is actually ending in a 500 error for the twig definition when the error seems to happen.

🐛 Bug report
Status

Active

Version

1.5

Component

Code

Created by

🇫🇮Finland heikkiy Oulu

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

Comments & Activities

Production build 0.71.5 2024