Review main Merged

88369[TASK] Improve DH->fixUniqueInPid() and DH->fixUniqueInSite()

Christian Kuhn CR +2 V +2 Normal +35 −35 updated 02/26/25, 19:55

Commit message

DataHandler->fixUniqueInPid() is exclusively used during "move".
The first thing it does, is to fetch the record in question, even
if there is no field that needs to be "fixed" according to TCA.
The patch changes the methods signature to get the full record
hand over, which we have at hand in "move" already. The v13
backport is a bit more conservative by having a fallback.

DH->fixUniqueInSite() is similar, but it is not only used during
"move", but also by DH->fixUniqueInSiteForSubpages(), and we can't
simply change the signature to "always give me the record" since
DH->fixUniqueInSiteForSubpages() involves int_pageTreeInfo() which
involves resolveVersionedRecords(), which uses PlainDataResolver.
This rabbit hole is deeper than this patch can handle. For now,
we allow submitting a full record row, but have a fallback for
"uid only", but we also resort a bit to at least suppress DB calls
if possible.

This shaves yet another set of useless queries off from move.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • Benni Mack +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Anja Leichsenring +1
    • Stefan Bürk +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 67

  1. Christian Kuhn uploaded patch set 1 02/26/25, 17:48

  2. core-ci voted on patch set 1 V +1 02/26/25, 17:55 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74783

  3. Stefan Bürk voted on patch set 1 CR +1 V +1 02/26/25, 18:17

  4. Benni Mack voted on patch set 1 CR +1 V +1 02/26/25, 18:46

  5. Christian Kuhn voted on patch set 1 CR +2 V +2 02/26/25, 18:48

  6. Anja Leichsenring voted on patch set 1 CR +1 V +1 02/26/25, 18:51

  7. Christian Kuhn merged patch set 2 02/26/25, 19:55