Review main Abandoned

93291[BUGFIX] Dispatch AfterContentHasBeenFetchedEvent in PageView

Nikita Hovratov CR 0 V 0 Easy +13 −2 updated 10/02/26, 07:52

Commit message

With the introduction of automatic ContentAreas resolving in PageView
object, it is possible to omit the page-content data processor. This
data processor provides an event to manipulate the fetched records.
Unfortunately, this does not work with the newly introduced
ResolveContentAreasEvent, because it is called very early in the
middleware stack, when the request is not finally built yet.

To provide a compatiblity for both setups, with and without the
processor, the AfterContentHasBeenFetchedEvent is now dispatched in
PageView as well.

The todo to deprecate this Event is removed for now. Although this event
is not very elegant with its grouped records array, it's still pretty
new and deprecating it that fast in the release cycle might be
disruptive.

Review

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

Issues 2

Files 2

Review log 89

  1. Nikita Hovratov uploaded patch set 1 03/20/26, 14:27

  2. Oli Bartsch commented on patch set 1 03/20/26, 14:34

    PageViewContentObject.php:179

    So the event might be dispatched two times in one request?
  3. core-ci voted on patch set 1 V +1 03/20/26, 14:37 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98302

  4. Nikita Hovratov commented on patch set 1 03/20/26, 14:45

    PageViewContentObject.php:179 Reply

    Yes, is this bad?
  5. Oli Bartsch commented on patch set 1 04/13/26, 08:00

    PageViewContentObject.php:179 Reply

    I think so. How do you ensure you are not manipulating an already processed content result then?
  6. Christian Kuhn commented on patch set 1 04/14/26, 12:02

    PageViewContentObject.php:179 Reply

    I stumbled upon this issue as well since I want the fallback to globals TYPO3_REQUEST being deprecated in v14. I solved it differently by handing over $request late: https://review.typo3.org/c/Packages/TYPO3.CMS/+/93654
  7. Nikita Hovratov commented on patch set 1 04/15/26, 09:07

    PageViewContentObject.php:179 Reply Unresolved

    @bo@cedev.de I think we need then another Event at this point. ResolveContentAreasEvent can only be used internally by TYPO3 to prepare the (lazy) Content Areas Collection, but not for manipulating records, as it is too early in the middleware stack (PrepareTypoScript).
  8. Christian Kuhn wrote 06/18/26, 23:05

    Removed cc Christian Kuhn.
  9. Nikita Hovratov abandoned the change 10/02/26, 07:52

    I'll abandon this approach. So far it hasn't been a huge problem, but we should probably have a look into it in the future.