Review 13.4 Merged

89617[BUGFIX] Correctly hard-delete inline foreign field children

Christian Kuhn CR +2 V +2 Normal +44 −19 updated 06/03/25, 18:21

Commit message

This one was found by one of the flex->inline tests when
working on #79014 tests: When a parent record that has
more than one inline child is hard-deleted after it has
been soft-deleted (typically using the recycler), attached
children have to be hard-deleted as well, but are not.
It works when only child is attached, though.

The reason is a detail in PlainDataResolver that takes care
of resorting given child ids. Beside the situation that
resorting is probably not needed in the delete case,
processSorting() also applies the deleted restriction to
the query that is used to resort and thus "looses"
soft-deleted records.

The solution is to never apply the DeletedRestriction in
order to retain the full list of incoming ids when bringing
records into the correct order, since deleted restrictions
should have been applied already if needed - typically by
RelationHandler.

The patch resolves according @todo comments from #79014
and adds a test for a "simple" parent->inline
foreign_field scenario that does not involve flex forms.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
  • Verified V +2 Done
    • Christian Kuhn +2
    • core-ci +1 CI

Issues 3

Files 5

Review log 34

  1. Christian Kuhn uploaded patch set 1 06/03/25, 18:13

  2. core-ci voted on patch set 1 V +1 06/03/25, 18:19 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79812

  3. Christian Kuhn voted on patch set 1 CR +2 V +2 06/03/25, 18:21

  4. Christian Kuhn merged patch set 2 06/03/25, 18:21