Patterns provider is always set to the base_plugin_definition provider

Created on 8 February 2024, 5 months ago
Updated 2 March 2024, 4 months ago

Problem/Motivation

When using ui_patterns_library to find patterns defined in another module using the file module.patterns.yml the templates are not found when rendering since the provider is set to ui_patterns_library instead of the module providing the module.patterns.yml file.

Steps to reproduce

  1. Create a custom module providing at least one pattern in the file module.patterns.yml
  2. Enable the ui_patterns_library module
  3. Notice that the site throws the error Twig\Error\LoaderError: Template "modules/contrib/ui_patterns/modules/ui_patterns_library/templates/pattern-template-name.html.twig" is not defined when rendering the pattern

Proposed resolution

Use the provider set by the pattern if ine exists and fall back to using the base plugin proivider.

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡ΈπŸ‡ͺSweden auth

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

Comments & Activities

Production build 0.69.0 2024