Review main Abandoned

94441[BUGFIX] Align LanguageAspect conversion in DataMapper

Nikita Hovratov CR 0 V -1 Easy +31 −1 updated 09/02/26, 07:49

Commit message

Since bugfix #93765 the language is also taken into account for extbase
identity mapping. Due to a discrepancy in DataMapper and Backend class
the LanguageAspect for the query is converted differently, when the
overlay type is "OVERLAYS_OFF".

DataMapper: OVERLAYS_OFF -> OVERLAYS_MIXED
Backend: OVERLAYS_OFF -> OVERLAYS_ON_WITH_FLOATING

This may lead to a case, where the very same object is saved two times
in the session, but with different identifiers. For example:

- 1502@0-includeFloating-0,pageNotFound
- 1502@0-mixed-0,pageNotFound

This has consequences when trying to compare two extbase entities. Even
though they are technically the same, they have two different object
pointers in PHP, and thus any comparison will fail. This became apparent
in ObjectStorage->contains as there is a comparison by spl_object_hash.

The fix is to align these two places, to always result in the same
overlay type, when the original type is "OVERLAYS_OFF". The chosen
type is "OVERLAYS_ON_WITH_FLOATING" as this should be preferred over
the ambiguous mixed mode.

The reason for the conversion is that extbase records normally behave
differently than the page content language fallback. Standard is to have
overlays with a base record in default language.

Review

  • Code review CR 0
  • Verified V -1
    • core-ci -1 CI

Issues 2

Files 3

Review log 1118

  1. Nikita Hovratov uploaded patch set 1 06/09/26, 18:34

  2. Nikita Hovratov uploaded patch set 2 06/09/26, 18:43

  3. core-ci voted on patch set 1 V -1 06/09/26, 18:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103240

  4. core-ci voted on patch set 2 V -1 06/09/26, 18:56 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103241

  5. Stefan Bürk commented on patch set 2 06/09/26, 20:24

    RelationTest.php:81

    Test method **must** not start with `test` prefix. We have a integration test for that which fails. Only as FYI. https://git.typo3.org/typo3/CI/cms/-/jobs/5687399
  6. Nikita Hovratov uploaded patch set 3 V -1 06/10/26, 06:56

  7. Nikita Hovratov commented on patch set 2 06/10/26, 06:56

    RelationTest.php:81 Reply

    Done
  8. core-ci voted on patch set 3 V -1 06/10/26, 07:09 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103278

  9. Nikita Hovratov uploaded patch set 4 V -1 06/10/26, 12:35

  10. Nikita Hovratov uploaded patch set 5 06/10/26, 12:36

  11. core-ci voted on patch set 4 V -1 06/10/26, 12:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103334

  12. core-ci voted on patch set 5 V -1 06/10/26, 12:49 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103335

  13. Nikita Hovratov rebased onto patch set 6 V -1 06/11/26, 07:21

  14. core-ci voted on patch set 6 V +1 06/11/26, 07:28 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/103379

  15. Oliver Klee voted on patch set 6 V +1 06/11/26, 11:29

  16. Nikita Hovratov rebased onto patch set 7 V +1 09/02/26, 07:10

  17. core-ci voted on patch set 7 V -1 09/02/26, 07:24 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107577

  18. Nikita Hovratov abandoned the change 09/02/26, 07:49

    Seems to be fixed by #88886