Twig loader error due to missing widget template

Created on 30 October 2023, about 1 year ago
Updated 2 January 2024, 11 months ago

Problem/Motivation

After updating the module to the 2.x dev version, I'm getting a Twig loader error when trying to add or edit a node within a content type that has an entity reference with layout widget:
Twig\Error\LoaderError: Template "modules/contrib/entity_reference_layout/templates/entity-reference-layout-widget.html.twig" is not defined. in Twig\Loader\ChainLoader->getCacheKey() (line 21 of /var/www/html/web/core/themes/claro/templates/node-edit-form.html.twig).

Steps to reproduce

  • Update the module from version 1.x to 2.x.
  • Navigate to the add or edit forms for a content type that uses this module for at least one field.

Proposed resolution

Add the referenced template, entity-reference-layout-widget.html.twig, within the module's templates directory. (I tried a couple things without success, so I'm not sure what's supposed to go in the template.)

πŸ› Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States kurttrowbridge

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

Comments & Activities

Production build 0.71.5 2024