links/entity-IDs missing when creating multiple entities implicitly

Created on 3 April 2023, about 2 years ago

Problem/Motivation

I have a WissKI bundle "Person" and a WissKI bundle "Human-Made Object". I have a plain text field in the "Person" bundle linking the work to a "Human-Made Object", cardinality unlimited. If I create a new person and I fill in a couple of these fields using "Add another item", for each of these a new WissKI individual should be created when I click on "save". Instead, while the work entry is correctly created, some of the fields do not link to "Human-Made Objects" but just show the text I entered without a link (see screenshots below).

Steps to reproduce

Here's the model in the pathbuilder:

Here's the form where I create the person entry with a couple of links to (implicitly newly created) "Human-Made Objects":

Once I click on "save" I get to see the "view" page of the newly created person entry:

In the example, the third "Human-Made Object" with the identifier "kdlws/78" has not been linked to an entity.

Proposed resolution

I guess that at the time when the "Person" view is built to display the newly created entry, the Drupal database does not yet has access to all the entity ids of the dependent entities that have been created "on the fly". After a page refresh the links are (usually) correctly shown, but the fact that the entity ID cannot be accessed at the moment of "save" seems to indicate that something is going wrong here.

Remaining tasks

Find out why the entity ID seems to be unknown to Drupal at the time of "save".

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.11

Component

Hackathon

Created by

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

Comments & Activities

Production build 0.71.5 2024