Review main Merged

93755[TASK] Pass PageContext to ModifyPageLayoutContentEvent

Andreas Kienast CR +2 V +2 Easy +9 −2 updated 11/11/26, 12:48

Commit message

The `ModifyPageLayoutContentEvent` now provides the `PageContext`
of the page module, so event listeners can use the already
resolved page record, its translations and the selected languages
instead of fetching them on their own.

Review

  • Code review CR +2 Done
    • Oli Bartsch +2
    • Marvin Buchmann +1
    • Josua Vogel +1
  • Verified V +2 Done
    • Oli Bartsch +2
    • Marvin Buchmann +1
    • Josua Vogel +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 2026

Show 1 earlier messages
  1. Andreas Kienast uploaded patch set 1 04/20/26, 14:40

  1. Marvin Buchmann voted on patch set 1 CR +1 V +1 04/20/26, 14:59

  2. core-ci voted on patch set 1 V +1 04/20/26, 15:03 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100574

  3. Christian Kuhn commented on patch set 1 04/20/26, 16:54

    not sure. PageLayoutContext is a doomed stateful class that we will have to fix. i had a patch just a few month ago to at least tame it by getting rid of a 'loop-dependency'. 'make it easier' may not be enough since i'm pretty sure we'll have to break this soon. we *can* go ahead with this patch, but it will make a refactoring of this state-service mixture class more complicated when it is exposed in a event now. for now, i wanted to at least state the issue, and i absolutely not insist on it. but let's talk about it.
  4. Christian Kuhn commented on patch set 1 04/20/26, 17:02

    Maybe: Expose only the stable scalar data listeners actually need. getPageId(), getLanguageId(), maybe getPageRecord() directly on the event, without touching PageLayoutContext at all. That solves the use case without cementing the problematic class into public API.
  5. Andreas Kienast commented on patch set 1 04/21/26, 05:09

    Reply

    That's totally fine for me. The common use-case is to use the existing page record, currently consumers have to fetch the page on their own.
  6. Andreas Kienast commented on patch set 1 04/21/26, 05:48

    Reply

    Another idea: Would passing `PageContext` (not `PageLayoutContext`!) be feasible? That contains everything one might need (incl. all the localization magic), but this disqualifies the patch for v13 (which might be fine).
  7. Benni Mack updated the commit message in patch set 2 CR +1 V +1 04/22/26, 06:46

  8. core-ci voted on patch set 2 V +1 04/22/26, 11:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100790

  9. Christian Kuhn commented on patch set 2 04/23/26, 11:01

    Reply

    PageContext is a good idea. Issue: It is new and @internal, we may want to give it some time before we expose it as API, and I'm not 100% sure we'll actually keep Andreas solution right now since it I raised a concern in the introducing patch that hasn't been sorted out, yet. I currently lean towards my first proposal, and don't insist: We could go with my solution *now* and potentially add / rebuild towards PageContext *later* when settled?
  10. Marvin Buchmann commented on patch set 2 04/23/26, 11:21

    Reply

    The whole context would be nice in the future. Passing only the most relevant data (page record, selected language(s) and maybe visible page translations) for now is already an improvement and fine for me.
  11. Christian Kuhn wrote 06/18/26, 23:03

    Removed cc Christian Kuhn.
  12. Marvin Buchmann uploaded patch set 3 V +1 11/10/26, 14:43

  13. Marvin Buchmann uploaded patch set 4 11/10/26, 14:46

  14. core-ci voted on patch set 3 V -1 11/10/26, 14:57 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113914

  15. core-ci voted on patch set 4 V +1 11/10/26, 15:01 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113915

  16. Georg Ringer voted on patch set 4 CR +1 V +1 11/10/26, 18:06

  17. Benni Mack uploaded patch set 5 CR +1 V +1 11/10/26, 22:18

  18. Oli Bartsch commented on patch set 5 11/10/26, 22:29

    PageLayoutController.php:132

    I wonder whether we should pass the full pageContext instead, while treating https://review.typo3.org/c/Packages/TYPO3.CMS/+/97449 as task, and backporting to v14. I'm not even sure why I added it as internal in the first place.. maybe to be able to change until LTS, but I see no reason to have this DTO internal in v14 at all.
  19. core-ci voted on patch set 5 V +1 11/10/26, 22:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/113991

  20. Benni Mack uploaded patch set 6 V +1 11/11/26, 05:55

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

  22. Josua Vogel voted on patch set 6 CR +1 V +1 11/11/26, 07:09

  23. Marvin Buchmann voted on patch set 6 CR +1 V +1 11/11/26, 07:35

  24. Oli Bartsch commented on patch set 6 CR +2 V +2 11/11/26, 12:48

    Reply

    Done

    PageLayoutController.php:132 Reply

    Done
  25. Oli Bartsch merged patch set 7 11/11/26, 12:48