IEF popup doesn't work with nested paragraphs

Created on 27 March 2025, about 1 month ago

Problem/Motivation

Paragraphs add/edit form are not opened in the pop-up if it is configured for nested paragraphs.

Steps to reproduce

1. Add any content type, like an article.
2. Add at least 2 paragraph types, let's say A and B.
3. Add any fields for the paragraph types A and B, but in paragraph A, there should be a reference to paragraph B.
4. Add a paragraph reference field in the article content type (should be able to reference paragraph A).
5. In paragraph A, configure the IEF complex widget with a popup for the reference field (from step 3).
6. Go to the article add page, try to add A and B paragraphs, and notice that the popup doesn't work when adding (or editing after saving) the paragraph of type B.

Proposed resolution

As I found during debugging -> the problem is in the ief_popup_inline_entity_form_entity_form_alter. It always relies on the form display from the form_storage, but in fact, there could be a node form display object, even though the reference field of the nested paragraph is not a part of it.

So, add a more generic solution.

🐛 Bug report
Status

Active

Version

2.2

Component

Code

Created by

🇺🇦Ukraine quadrexdev Lutsk

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