Issue Bug Resolved

#110526fieldControl.addRecord discards unsaved parent on unsaved IRRE child

Oliver Bartsch 08/24/26, 11:29 updated 09/03/26, 07:05

Description

Clicking the plus-sign field control (fieldControl.addRecord) on a type=group/type=select field that belongs to a record which is itself still unsaved (e.g. a newly added IRRE/inline child that has not been saved yet) silently discards the unsaved parent and fails to link the newly created record back to it.

Wizard/AddController linking logic requires a persisted uid and has no way to resolve a NEW placeholder, so MathUtility::canBeInterpretedAsInteger() gating in AddController init/mainAction causes the link-back to be dropped.

Steps to reproduce

  1. Open a record with an IRRE/inline field.
  2. Click Create new to add a new unsaved inline child.
  3. On a group/select field of that unsaved child, click the plus-sign control to create a related record.
  4. The related record creation form appears, but once saved there is no confirmation and no way back – the unsaved parent data is lost and the relation is never linked.

Fix

A save-and-continue-to-add-record path saves the parent first, resolving the real uid via DataHandler substNEWwithIDs, then redirects into the Wizard/AddController flow, with a save/discard/keep-editing confirmation dialog when the parent has unsaved changes. The final redirect back to the edited document is computed server-side from the now-persisted editconf, not from a client-supplied returnUrl.

Reviews 2

History 2732

Show 7 earlier messages
  1. Oliver Bartsch commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-09-03T07:05:12+00:00" > 09/03/26, 07:05 </span>

    Applied in changeset commit:4373fadcb84a06cff397f7359c936e87f874ff31.