Review main Merged

92743[BUGFIX] Make Extbase identity map language-aware

Benni Mack CR +2 V +2 Hard +266 −50 updated 02/26/26, 10:58

Commit message

The Extbase persistence session's identity map now includes language
context when caching domain objects. Previously, the identity map
used identifiers based only on the record's UID and localized UID,
which could cause incorrect translations to be returned when the
same object was accessed with different LanguageAspect configurations
within the same request.

The identity map identifier now includes a hash of the language
context (contentId, overlayType, and fallbackChain) to ensure
objects loaded with different language configurations are cached
separately.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Anja Leichsenring +1
    • Mathias Brodala +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oliver Klee +1
    • Anja Leichsenring +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 1519

  1. Benni Mack uploaded patch set 1 02/08/26, 12:43

  2. core-ci voted on patch set 1 V +1 02/08/26, 12:52 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95407

  3. Benni Mack uploaded patch set 2 V +1 02/08/26, 13:18

  4. core-ci voted on patch set 2 V +1 02/08/26, 13:26 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95410

  5. Mathias Brodala commented on patch set 2 02/09/26, 06:55

    LanguageAspect.php:143

    Nitpick: this is not a hash but an identifier. If we really want a hash, then we should hash the identifier. But really, renaming this to "getContentIdentifier" or similar should suffice.

    Backend.php:183

    This should be moved to the top again and only the $languageAspect fetched before. Updating the query settings should be skipped if we don't use them afterwards.

    Session.php:181

    Since this is only used here we should move it from LanguageAspect.
  6. Benni Mack uploaded patch set 3 V +1 02/12/26, 17:01

  7. Benni Mack commented on patch set 3 02/12/26, 17:02

    This change is ready for review.

    Backend.php:183 Reply

    we need the language aspect, so I needed to keep it below here, but the query does not need to be updated (so I moved it below)

    Session.php:181 Reply

    Done
  8. Benni Mack commented on patch set 3 02/12/26, 17:02

    LanguageAspect.php:143 Reply

    Done
  9. core-ci voted on patch set 3 V +1 02/12/26, 17:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95757

  10. Anja Leichsenring voted on patch set 3 CR +1 V +1 02/12/26, 19:42

  11. Mathias Brodala commented on patch set 3 02/13/26, 07:02

    Backend.php:183 Reply

    Still setRespectStoragePage() and setRespectSysLanguage() are called without effect in case the session knows the object. So this should be moved down, too.
  12. Benni Mack commented on patch set 4 CR +1 V +1 02/13/26, 07:30

    Published edit on patch set 3.
  13. core-ci voted on patch set 4 V +1 02/13/26, 07:38 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/95804

  14. Mathias Brodala commented on patch set 4 CR +1 02/13/26, 07:50

    Backend.php:183 Reply

    Done
  15. Anja Leichsenring voted on patch set 4 CR +1 V +1 02/13/26, 19:13

  16. Simon Schaufelberger voted on patch set 4 CR +1 V +1 02/25/26, 23:52

  17. Oliver Klee voted on patch set 4 V +1 02/26/26, 10:50

  18. Benni Mack commented on patch set 4 CR +2 V +2 02/26/26, 10:58

    thanks!
  19. Benni Mack merged patch set 5 02/26/26, 10:58