Review 14.3 Merged

97418[BUGFIX] Change stage of related records in FlexForms

Garvin Hicking CR +2 V +2 Normal +158 −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
  • Verified V +2 Done
    • Benni Mack +2
    • core-ci +1 CI

Issues 1

Files 4

Review log 69

  1. Garvin Hicking commented on patch set 1 11/08/26, 07:52

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/workspaces/Tests/Functional/DataHandler/ChangeStageCommandTest.php
  2. Garvin Hicking commented on patch set 2 11/08/26, 07:55

    Published edit on patch set 1.
  3. core-ci voted on patch set 1 V -1 11/08/26, 07:58 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113596

  4. core-ci voted on patch set 2 V -1 11/08/26, 08:10 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113597

  5. Benni Mack uploaded patch set 3 V -1 11/09/26, 12:37

  6. core-ci voted on patch set 3 V +1 11/09/26, 12:46 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113667

  7. Benni Mack marked it ready for review 11/09/26, 12:48

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

  9. Benni Mack merged patch set 4 11/09/26, 12:48