Ajax error Undefined index: target_bundles in entity_browser_entity_form_inline_entity_form_reference_form_alter

Created on 7 April 2020, over 4 years ago
Updated 11 December 2023, about 1 year ago

Problem

The function entity_browser_entity_form_inline_entity_form_reference_form_alter() assumes that target bundles have been specified for the entity reference field that the IEF widget is being used on.

If they have not, the entity browser does not open when you press "Add existing" in IEF and you get an AJAX error in the console:
"Undefined index: target_bundles in /app/web/modules/contrib/entity_browser/modules/entity_form/entity_browser_entity_form.module on line 55"

Solution

Check whether the target_bundles array key is set before accessing it.

πŸ› Bug report
Status

Fixed

Version

2.4

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States gmercer

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