Review 13.4 Merged

89489[BUGFIX] Recycler may hard-delete too much

Christian Kuhn CR +2 V +2 Normal +144 −58 updated 05/20/25, 15:37

Commit message

Localized records are not attached to a localized page
directly: They only "know" the default language page record
since their pid is set to it.

This can lead to broken behavior in this scenario:
* Have a page with a page localization and some localized
  content elements.
* Soft-delete the page localization. This will soft-delete
  localized content elements as well. Good.
* Create a new page localization in the same language and
  add some localized content elements. We now have two
  localized pages for the same language in DB: One "active",
  the other one soft-deleted.
* Use the recycler to hard-delete the previously soft-deleted
  page localization. This hard-deletes all localized content
  elements. Bad.

Since there is no information which page localization a
content element (or more generally any record) belongs to,
the fix is to check during hard-delete of localized pages if
another page localization in this language exists and to
skip record deletion in this case.

Review

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

Issues 1

Files 5

Review log 34

  1. Christian Kuhn uploaded patch set 1 05/20/25, 15:26

  2. core-ci voted on patch set 1 V +1 05/20/25, 15:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/79249

  3. Christian Kuhn voted on patch set 1 CR +2 V +2 05/20/25, 15:37

  4. Christian Kuhn merged patch set 2 05/20/25, 15:37