Review main Merged

97339[BUGFIX] Change stage of related records in FlexForms

Simon Praetorius CR +2 V +2 Normal +76 −11 updated 11/09/26, 12:48

Commit message

Content element A references content element B in a FlexForm, and
both are changed in a workspace. When A is sent to the next stage,
B should follow, as it does when A is published. Instead, B stays
on its stage and an error is logged.

The reason is that the reference index stores the live uid of B,
and only during publishing the workspace version of B is looked
up. Instead, a stage change tries to change the stage of the live
record, which fails.

The same happens for a file linked in a FlexForm: the stage change
fails for sys_file because the table has no workspace support.

This patch aligns staging with publishing: live uids are resolved
to their workspace version, which is then moved to the same stage
as the requested record. Records of tables without workspace
support are skipped.

Note that this issue is already partly avoided from an end-user
perspective as the workspaces module pre-selects dependencies in the
list if they are part of the current selection (e. g. if a content
elements references another content element on the same page).

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Garvin Hicking +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • Garvin Hicking +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 1318

  1. Simon Praetorius uploaded patch set 1 11/04/26, 13:25

  2. core-ci voted on patch set 1 V +1 11/04/26, 13:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113277

  3. Simon Praetorius rebased onto patch set 2 V +1 11/04/26, 14:42

  4. core-ci voted on patch set 2 V +1 11/04/26, 14:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113285

  5. Simon Praetorius uploaded patch set 3 V +1 11/04/26, 16:07

  6. core-ci voted on patch set 3 V +1 11/04/26, 16:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113296

  7. Simon Praetorius rebased onto patch set 4 V +1 11/04/26, 17:01

  8. Simon Praetorius marked it ready for review 11/04/26, 17:11

  9. core-ci voted on patch set 4 V +1 11/04/26, 17:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113304

  10. Oliver Klee voted on patch set 4 V +1 11/04/26, 18:06

  11. Simon Schaufelberger voted on patch set 4 CR +1 V +1 11/06/26, 00:57

  12. Simon Praetorius updated the commit message in patch set 5 CR +1 V +1 11/06/26, 12:23

  13. Oliver Klee voted on patch set 5 V +1 11/06/26, 12:29

  14. core-ci voted on patch set 5 V +1 11/06/26, 12:34 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113505

  15. Garvin Hicking voted on patch set 5 CR +1 V +1 11/06/26, 20:02

  16. Benni Mack voted on patch set 5 CR +1 V +1 11/07/26, 21:24

  17. Benni Mack voted on patch set 5 CR +2 V +2 11/09/26, 12:48

  18. Benni Mack merged patch set 6 11/09/26, 12:48