Skip to content

[BUGFIX] Do not delete children when purging already deleted records - #785

Merged
achimfritz merged 2 commits into
b13:masterfrom
dennismetz:bugfix/695-do-not-delete-children-of-deleted-records
Nov 16, 2026
Merged

achimfritz merged 2 commits into
b13:masterfrom
dennismetz:bugfix/695-do-not-delete-children-of-deleted-records

Conversation

@dennismetz

Copy link
Copy Markdown
Contributor

When an already soft-deleted container is purged, e.g. by cleanup:deletedrecords, the DeleteHook resolves the container's children again and deletes them.

For a translated container in connected mode, the children are resolved via the default language container. If an editor deleted the translation and translated the container again, the children of the new, active translation are found and deleted, although the record being purged has nothing to do with them.

The children of a soft-deleted record were already deleted when the record itself was deleted, so the DeleteHook now skips records that are already marked as deleted.

Tests:

  • Add a connected mode test which hard-deletes a deleted container translation while another active translation of the same container exists

Fixes: #695

When an already soft-deleted container is purged, e.g. by
cleanup:deletedrecords, the DeleteHook resolves the container's
children again and deletes them.

For a translated container in connected mode, the children are
resolved via the default language container. If an editor deleted
the translation and translated the container again, the children of
the new, active translation are found and deleted, although the
record being purged has nothing to do with them.

The children of a soft-deleted record were already deleted when the
record itself was deleted, so the DeleteHook now skips records that
are already marked as deleted.

Tests:

- Add a connected mode test which hard-deletes a deleted container
  translation while another active translation of the same container
  exists

Fixes: b13#695

@achimfritz achimfritz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 , thanks

@achimfritz
achimfritz merged commit 6d62e3b into b13:master Nov 16, 2026
0 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DeleteHook incorrectly deletes child records of active translation when a soft-deleted sibling translation is permanently removed

2 participants