#110888Workspaces module fails with TypeError for a deleted or missing page
Description
Problem
In a workspace, opening the Workspaces module (“Publish”) with the id of a deleted page fails with
TypeError TYPO3\CMS\Backend\Template\Components\DocHeaderComponent::setPageBreadcrumb(): Argument #1 ($pageRecord) must be of type array, null given
Other page modules (Page, List, Preview, Permissions) show their “no page selected” state for the same id. Once #107213 lets a missing page id pass the BackendModuleValidator like a deleted page, editors hit this right after deleting a page created in the workspace. The module state keeps its id, and the next switch to the Workspaces module opens the module with it.
Steps to reproduce
- In LIVE, delete a page (it is marked
deleted=1). - Switch to a workspace.
- Open the Workspaces module with the id of that page, for example through the module state (select the page before deleting it) or with the URL parameter
id.
Expected: the module renders without a page breadcrumb, as for the root page.
Actual: TypeError.
Cause
ReviewController::handleRequest() reads the page with
$pageRecord = BackendUtility::getRecord('pages', $pageUid);
...
$view->getDocHeaderComponent()->setPageBreadcrumb($pageRecord);
getRecord() returns null for a deleted or missing page, and setPageBreadcrumb() requires an array. The call was introduced with the breadcrumb API in change “[TASK] Deprecate MetaInformation API” (14.0).
Proposed fix
$pageRecord = BackendUtility::getRecord('pages', $pageUid) ?? [];
Verified on 14.3.7 and main with a new functional test for ReviewController (deleted page, missing page). Without the change both fail with the TypeError, with the change both render. A patch against main follows on Gerrit (Releases: main, 14.3).
Reviews 3
Related issues 1
History 12
-
Georg Tiefenbrunn changed Related to #107213 <span data-processor="relativetime" data-value="2026-10-02T11:29:35+00:00" > 10/02/26, 11:29 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96309 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-02T11:37:56+00:00" > 10/02/26, 11:37 </span>