Warning: Undefined variable $parameters calling _process_ief_form()

Created on 17 February 2024, 11 months ago

Problem/Motivation

When using a profile as a parent (or i assume any exotic entity type), removing an item raises a warning in the watchdog log, this is because the logic overrides _process_ief_form with $parameter = null

Steps to reproduce

Install profile module and add IEF and IEF popup to a profile entity. Add and remove an entity via the form. See the logs

Message	Warning: Undefined variable $parameters in ief_popup_field_widget_single_element_inline_entity_form_complex_form_alter() (line 79 of /var/www/html/web/modules/contrib/ief_popup/ief_popup.module)
#0 /var/www/html/web/core/includes/bootstrap.inc(164): _drupal_error_handler_real(2, 'Undefined varia...', '/var/www/html/w...', 79)
#1 /var/www/html/web/modules/contrib/ief_popup/ief_popup.module(79): _drupal_error_handler(2, 'Undefined varia...', '/var/www/html/w...', 79)

Proposed resolution

Just set a default before this code so that it's not null if it doesn't match a known type.

    // If the entity type is unknown we won't customise the messaging.
    $parameters = [];

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇦🇺Australia sime Melbourne

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024