IEF displaying paragraph relationship rather than end target within a node edit form

Created on 31 January 2023, almost 2 years ago

Problem/Motivation

I've just got two articles "Article 1" and "Article 2" (of type Article with a paragraph field labelled "Related content").
The Paragraph 'form display' is set to "Inline entity form - Complex" and the 'Display" set to "Rendered entity".

This paragraph type has an Entity Reference field setup to allow an Article node link labelled "Content reference".
The Content reference 'form display' widget is set to Autocomplete and the 'display' widget to "label linked to reference".
The paragraph also has an additonal text field which seems to behave correctly.

When editing Article 2 to add a new paragraph with a link to Article 1, saving the new paragraph the edit form shows the new paragraph with the entry shown as:

"Orphaned Content reference: Article 1"

followed by the Edit and Remove buttons

When the node is saved it shows the expected link correctly in the node as a link titled "Article 1"

However when editing Article 2 again the paragraph shows:

"Article 2 > Related content"

followed by the Edit and Remove buttons.

I would expect both just to say "Article 1"?

Both Article 1 and Article 2 were already saved so not sure why orphaned is relevant?

Although the issue does not stop related nodes displaying correctly, editing nodes can be misleading.
If you have multiple "Related contents they all show the same text without reference to what is actually being referenced.

Steps to reproduce

New Drupal 10.0.2 installation with "Paragraphs" and "Inline Entity Form" enabled.

Create a new paragraph type "Content reference" with an Entity reference field enabled for Node->Article

Add this paragraph field to the Article content type.
Setup diplays as detailed above.
Create two articles "Article 1" and "Article 2"
Edit Article 2 and add a new paragraph to reference Article 1.

Not sure if related issue is relevant or not?

🐛 Bug report
Status

Active

Component

Code

Created by

🇬🇧United Kingdom donaldp

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

Comments & Activities

Production build 0.71.5 2024