Review main Merged

95395[BUGFIX] Save unsaved parent before following addRecord wizard

Oli Bartsch CR +2 V +2 Hard +343 −7 updated 09/03/26, 07:00

Commit message

Clicking the "+" (fieldControl.addRecord) control on a field
belonging to a record that is itself still new (e.g. an unsaved
IRRE/inline child) silently discarded that unsaved record and never
linked the newly created one back to it, since Wizard/AddController
has no way to resolve a "NEW..." placeholder uid.

A new "_savedokaddrecord" FormAction saves the parent first, then
redirects into the add-record wizard using the real, persisted uid.
A confirmation dialog offers to save, discard, or keep editing when
the parent has unsaved changes. The redirect back to the edited
document once the wizard is done is computed server-side from the
now-persisted editconf, not from a client-supplied returnUrl.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Georg Ringer +1
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Georg Ringer +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 11

Review log 1418

  1. Oli Bartsch uploaded patch set 1 08/24/26, 13:09

  2. core-ci voted on patch set 1 V +1 08/24/26, 13:16 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107035

  3. Oli Bartsch rebased onto patch set 2 V +1 08/27/26, 05:36

  4. core-ci voted on patch set 2 V +1 08/27/26, 05:44 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107212

  5. Georg Ringer voted on patch set 2 CR +1 V +1 08/27/26, 06:14

  6. Anton Danilov commented on patch set 2 08/27/26, 10:36

    I tested it on "main" and everything works fine. Can it be fixed for 13.4 too?
  7. Oli Bartsch commented on patch set 2 08/27/26, 14:56

    Reply

    Since it worked your you, would you like to vote the patch? Unfortunately, this is not a priority bugfix and therefore can not land into v13 anymore. However, you could just use a composer patch in those installations.
  8. Oli Bartsch uploaded patch set 3 CR +1 V +1 08/27/26, 14:57

  9. core-ci voted on patch set 3 V +1 08/27/26, 15:04 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107276

  10. Anton Danilov commented on patch set 3 V +1 08/27/26, 15:20

    Reply

    Thanks for the suggestion, but a composer patch isn't clean here - the fix also includes compiled JavaScript, so there's no straightforward way to patch it via composer on 13.4. Still, thanks for the patch.
  11. Georg Ringer voted on patch set 3 CR +1 V +1 09/01/26, 14:24

  12. Benni Mack commented on patch set 3 CR -1 09/01/26, 20:59

    I did a recursion check. Edit a sys_template. Hit the "add record" on the sys_templte.basedOn (level 1), on the new one, also create a new "basedOn" (level 2). Save the level 2, save level 1 and then all the previous GET parameters of the original record are gone.
  13. Benni Mack uploaded patch set 4 CR +1 V +1 09/01/26, 21:13

  14. core-ci voted on patch set 4 V +1 09/01/26, 21:22 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107533

  15. Benni Mack voted on patch set 4 CR +1 V +1 09/02/26, 09:57

  16. Georg Ringer voted on patch set 4 CR +1 V +1 09/03/26, 06:21

  17. Oli Bartsch commented on patch set 4 CR +2 V +2 09/03/26, 07:00

    Reply

    Done
  18. Oli Bartsch merged patch set 5 09/03/26, 07:00