_process_ief_form() throws warnings in dblog trying to get $entity_title from paragraph entity

Created on 17 January 2023, over 1 year ago
Updated 20 April 2023, about 1 year ago

Problem/Motivation

While trying to make any action in the popup with a paragraph entity type, the module throws warnings in dblog trying to get the title.

Steps to reproduce

- create a paragraph type;
- create a content type;
- in the content type add the field of type "Entity reference revision";
- set the reference to the newly created paragraph;
- set the field widget to "Inline entity form - Complex';
- open a node of the newly created content type;
- add a paragraph with IEF Complex Widget Dialog;
- open edit or duplicate form for any previously added paragraph.

In dblog you will get 4 warning messages:

Warning: Trying to access array offset on value of type null in _process_ief_form() (line 121 of /var/www/html/web/modules/contrib/ief_popup/ief_popup.module)

Proposed resolution

Proposed resolution: since the entity could not have a title, the $ief_form['title'] should be checked before getting the value from it, and the $popup_title should differ in those cases.

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine paulrad

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