Notice: Undefined index: #theme

Created on 29 March 2022, about 2 years ago
Updated 1 November 2023, 8 months ago

Problem/Motivation: I got and error after installing the module

I downloaded the module, enable the module, and apply the format to a entity reference field called 'Banner' on Basic Page content type view mode.

The banner already have an editorial workflow applied as well as the Basic page

Them I edited a banner inside of a page an set it to draft mode. The page preview still rendered the published version of the banner and not the lasted review.

The result is a page rendered error Notice: Undefined index: #theme in Drupal\entity_reference_preview\Plugin\Field\FieldFormatter\EntityReferenceEntityPreviewFormatter->Drupal\entity_reference_preview\Plugin\Field\FieldFormatter\{closure}() (line 207 of modules/composer/entity_reference_preview/src/Plugin/Field/FieldFormatter/EntityReferenceEntityPreviewFormatter.php).

The error seem to be caused by the respective variable not existing in the template files.

Drupal core 9.3.8

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇺🇸United States analaura@cellar-door.io Houston, TX

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024