Review main Merged

95555[BUGFIX] Avoid PHP error on unresolvable page layout

Stefan Bürk CR +2 V +2 Easy +28 −1 updated 10/15/26, 08:35

Commit message

The "page-content" data processor read the content areas of
the current page layout with a null safe call, but then used
the result without a guard. Whenever the page layout did not
resolve, the frontend request died with

  Call to a member function getGroupedRecords() on null

A page layout does not resolve when a layout identifier is
found for a page while the definition for that identifier is
not available in the context of that page. A reported case is
a mount point with mount overlay, whose target page lives in
another site, using page TSconfig based backend layouts.

Fall back to an empty content area collection, so the page is
rendered instead of failing with a PHP error. Rendering via
the classic CONTENT chain never asked for a page layout and
was not affected.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Wouter Wolters +1
    • Can Adrian Karadag +1
    • Josua Vogel +1
    • Benni Mack +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Can Adrian Karadag +1
    • Benni Mack +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 1315

  1. Stefan Bürk uploaded patch set 1 09/02/26, 10:29

  2. core-ci voted on patch set 1 V +1 09/02/26, 10:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107591

  3. Oliver Klee voted on patch set 1 CR +1 V +1 09/02/26, 11:03

  4. Can Adrian Karadag voted on patch set 1 CR +1 V +1 09/02/26, 11:18

  5. Stefan Bürk rebased onto patch set 2 CR +1 V +1 09/02/26, 11:21

  6. Oliver Klee voted on patch set 2 CR +1 V +1 09/02/26, 11:21

  7. core-ci voted on patch set 2 V +1 09/02/26, 11:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107609

  8. Can Adrian Karadag voted on patch set 2 CR +1 V +1 09/02/26, 11:31

  9. Josua Vogel voted on patch set 2 CR +1 09/02/26, 12:46

  10. Wouter Wolters voted on patch set 2 CR +1 09/02/26, 13:28

  11. Benni Mack voted on patch set 2 CR +1 V +1 09/02/26, 19:40

  12. Stefan Bürk voted on patch set 2 CR +2 V +2 09/03/26, 08:59

  13. Stefan Bürk merged patch set 3 09/03/26, 09:12

  14. Stefan Bürk commented on patch set 3 09/03/26, 09:16

    Post merge comment - `13.4` backport skipped, it was not required (already safe): * both $pageLayout uses are guarded: `foreach ($pageLayout?->getContentAreas() ?? [] as $contentAreaData) {` * `13.4` has no ContentAreaCollection class at all.
  15. Garvin Hicking wrote 10/15/26, 08:35

    Hashtag added: no-backport