Review main Merged

86681[BUGFIX] Ensure same RecordIdentityMap for cloned PageLayoutContext

Nikita Hovratov CR +2 V +2 Easy +1 −3 updated 10/30/24, 16:14

Commit message

In BackendLayoutRenderer the PageLayoutContext is cloned in case
we are in "layout" mode and a "language" is selected. The problem is
at the time of cloning, the property "recordIdentityMap" is not yet
initialized. And when calling `getGridForPageLayoutContext`, the
original context is initialized with this property and filled with
discovered Content Elements. In order to have the same identity map
in the cloned context, the map is now instantiated in the constructor
instead of lazily in the get method.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Benni Mack +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 1

Review log 78

  1. Nikita Hovratov uploaded patch set 1 10/21/24, 15:54

  2. core-ci voted on patch set 1 V +1 10/21/24, 16:02 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/68324

  3. Oli Bartsch commented on patch set 1 CR +1 V +1 10/21/24, 16:35

    This works. However, in case we want to keep the lazy loading, we could just do ``` $copy->recordIdentityMap = $this->getRecordIdentityMap(); ```
  4. Nikita Hovratov commented on patch set 1 10/21/24, 16:43

    Reply

    Let's see what Benni says. There is no huge benefit having it lazy load, or?
  5. Benni Mack commented on patch set 1 10/28/24, 13:19

    Reply

    fine like it is with this change
  6. Benni Mack voted on patch set 1 CR +1 V +1 10/28/24, 13:19

  7. Oli Bartsch voted on patch set 1 CR +2 V +2 10/30/24, 16:14

  8. Oli Bartsch merged patch set 2 10/30/24, 16:14