IEF integration is broken for bundleless entities, base fields and unsaved form displays

Created on 26 July 2017, about 8 years ago
Updated 3 August 2023, about 2 years ago

Hi there,

I've just found a "triple" bug within the IEF integration. The code in entity_browser_entity_form_inline_entity_form_reference_form_alter() currently breaks for having at least one of the 3 following use cases:

* The target entity type does not have bundle support: getTargetBundle() returns NULL in this case -> we have to use the target entity type ID instead
* The entity reference field is a base field -> you can't call $instance->get('cardinality') on base fields. But there's a nicer dedicated getCardinality() anyway, which can be used in both cases
* The entity form display is not stored in the database --> we have to follow the approach of the (deprecated) entity_get_form_display() function and create the form display on the fly

So, these are basically three different tiny issues, but I think it's easier to keep it in one issue report and patch.

I have already prepared a patch, and will also propose a PR on Github

🐛 Bug report
Status

Needs work

Version

2.6

Component

Widget plugins

Created by

🇦🇹Austria agoradesign Grieskirchen

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

Merge Requests

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.71.5 2024