Throw exception when using widget for a field with multiple bundles

Created on 27 March 2024, 3 months ago
Updated 22 April 2024, 2 months ago

Problem/Motivation

I get this exception when creating entity with entity reference field which has multiple bundles:
Message Error: Cannot use object of type Drupal\Core\Entity\EntityTypeBundleInfo as array in Drupal\entity_reference_modal\Plugin\Field\FieldWidget\EntityReferenceModalWidget->formElement()

Steps to reproduce

1. Create a entity reference field with several bundles
2. Choose Entity Reference Modal widget
3. Try create a entity

Proposed resolution

I attached patch for resolve this issue

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.69.0 2024