Review 14.3 Merged

97404[BUGFIX] Mark modified workspace version as deleted

Benni Mack CR +2 V +2 Hard +253 −45 updated 11/06/26, 22:06

Commit message

FormEngine names inline children by the uid of their workspace
version. Removing an inline child that has already been modified in a
workspace therefore sends the "delete" command with the workspace
uid, and DataHandler::deleteAction() discarded that version instead
of marking the live record as deleted. Publishing the workspace kept
the live child, although the editor removed it. This affects children
in the default language and translated children alike.

A "delete" command for a modified version of the current workspace
now deletes its live record, which turns the version into a delete
placeholder, exactly as when the live uid is given. Both uids of a
record now lead to the same result, and the publish carries the
latest workspace state of the record into the deleted live row.

Discarding by "delete" was a workaround from the time DataHandler
had no dedicated command for it, used by the "waste bin" of the
workspace module. Since #107519 the "discard" command does this,
and the workspace module uses it. Code that sends "delete" with the
uid of a modified workspace version to throw that version away has
to send "discard" instead.

Unchanged: new, moved and delete placeholder versions are still
discarded by "delete", as there is no live state to delete in the
workspace for them. A version of another workspace than the one of
the current user is still discarded as well.

As the command now runs through the regular delete path,
processCmdmap_deleteAction hooks are called with the live uid for
these records, as they are for any other delete.

Records referring to a version that becomes a delete placeholder now
get their reference index updated, so the parent no longer keeps a
stale reference to the child.

Review

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

Issues 1

Files 13

Review log 46

  1. Benni Mack commented on patch set 1 11/06/26, 21:30

    Cherry Picked from branch main.
  2. core-ci voted on patch set 1 V -1 11/06/26, 21:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113534

  3. Benni Mack commented on patch set 2 V -1 11/06/26, 21:52

    Published edit on patch set 1.
  4. core-ci voted on patch set 2 V +1 11/06/26, 22:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113541

  5. Benni Mack voted on patch set 2 CR +2 V +2 11/06/26, 22:06

  6. Benni Mack merged patch set 3 11/06/26, 22:06