---
title: "Important: #110233 - Search query added to AfterPageTreeItemsPreparedEvent"
manual: "TYPO3 Core Changelog"
version: "main"
permalink: "https://docs.typo3.org/permalink/changelog:important-110233-1787820210"
source: "Changelog/14.3.x/Important-110233-SearchQueryAddedToAfterPageTreeItemsPreparedEvent.rst"
typo3-version: "14.3.x"
typo3-major: 14
type: "important"
issue: 110233
forge: "https://forge.typo3.org/issues/110233"
tags: ["Backend", "PHP-API", "ext:backend"]
rendered: "2026-09-20T18:31:11+00:00"
---

# Important: #110233 - Search query added to AfterPageTreeItemsPreparedEvent {#important-110233-1787820210}

See [forge#110233](https://forge.typo3.org/issues/110233)

## Description {#description}

The PSR-14 event `\TYPO3\CMS\Backend\Controller\Event\AfterPageTreeItemsPreparedEvent`,
dispatched by `\TYPO3\CMS\Backend\Controller\Page\TreeController` after the
backend page tree items have been resolved and prepared, now carries the current
page tree search query explicitly, instead of requiring event listeners to
extract it themselves from GET parameters of the current PSR-7 request.

A new method `getSearchQuery(): ?string` has been added, returning the
search phrase used to filter the page tree, or `null` if no search is
currently active.

Note that the `$request` argument - and therefore the return value of
`getRequest()` \- is now nullable as well, since the event can be
dispatched in contexts where no PSR-7 request instance is available in future.

## Impact {#impact}

Custom event listeners that read the page tree search phrase via
`$event->getRequest()->getQueryParams()['q']` should be adapted to use
the new `$event->getSearchQuery()` method instead.

Listeners should furthermore no longer assume that `getRequest()` always
returns an instance of `ServerRequestInterface`, since it may be
`null` in future major versions.
