TWIG Fatal Error in child theme pattern definitions after 1.5 upgrade

Created on 13 April 2023, about 1 year ago

Problem/Motivation

We upgraded to version 1.5 from 1.4. We have a child theme with its own pattern/component definitions. These were working fine in version 1.4. Now in version 1.5 we're getting the following errors in our testing suite:

Twig\Error\LoaderError: Template "@my_subtheme/news-list/news-item-list.html.twig" is not defined in "modules/contrib/ui_patterns/templates/patterns-use-wrapper.html.twig" at line 9. in Twig\Loader\ChainLoader->getCacheKey() (line 98 of /vendor/twig/twig/src/Loader/ChainLoader.php).

I've reviewed #3335833 and while it seems related, the patch there didn't resolve this issue.

This error does not appear to affect existing sites, but only on new installs. It looks like in 8.1.5 there were a few commits which changed discovery of patterns including:
- https://www.drupal.org/project/ui_patterns/issues/3311471 ✨ Detect all theme patterns Fixed

I'm wondering if we may need to change the structure of our child theme patterns? I can't find documentation or release notes with any more information on this change.

Steps to reproduce

1. Add a new component/pattern to a child theme
2. Be on version 1.5 of `ui_patterns`
3. Install a new drupal site.
4. See the twig error

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

1.5

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States joegl

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

Comments & Activities

Production build 0.69.0 2024