#110340Breadcrumb links to record_edit route instead of Page/Layout module when editing a content element
Description
Summary
When a content element is edited in the full record editing view opened from Web > Layout, the breadcrumb links for the Layout module and the parent pages incorrectly point to the global record_edit route.
Clicking one of these breadcrumb entries opens /typo3/record/edit with only an id parameter. Since no record editing instruction such as edit[tt_content][uid]=edit is present, TYPO3 cannot build an editing form and displays the misleading message that the form could not be loaded, possibly because of insufficient permissions.
The backend user does have permission to edit the record. The content element form itself loads correctly and can be edited and saved.
Environment
- TYPO3 CMS: 14.3.5
- Backend module: Web > Layout
- Record type:
tt_content - Browser: Google Chrome 150 on Windows
- Installation type: Classic TYPO3 installation using a
typo3_srcsymlink - Reproducibility: Always in the tested installation
No special content type is required. The issue occurs with a regular content element.
Prerequisites
- A page exists in the page tree.
- The page contains at least one regular content element.
- The backend user has permission to view the page and edit the content element.
Steps to reproduce
- Open the TYPO3 backend.
- Open the module Web > Layout.
- Select a page containing at least one content element.
- Open a content element for editing so that the full record editing form is displayed.
- In the document header breadcrumb, click either:
- the “Layout” breadcrumb entry, or
- a parent page entry such as “Home”.
Actual result
The breadcrumb entry navigates to the global record editing route.
Example generated URL for the Layout breadcrumb:
/typo3/record/edit?token=[redacted]&id=0
Example generated URL for the parent page breadcrumb:
/typo3/record/edit?token=[redacted]&id=1
TYPO3 then displays:
The edit form could not be loaded The edit form for the requested records could not be loaded. This may be due to insufficient permissions.
The permissions message is misleading in this case. The backend user can edit and save the content element. The error occurs because the breadcrumb opens the wrong route without a record editing instruction.
The generated typo3-breadcrumb node data contains URLs similar to:
[
{
"identifier": "web_layout",
"label": "Layout",
"url": "/typo3/record/edit?token=[redacted]&id=0"
},
{
"identifier": "1",
"label": "Home",
"url": "/typo3/record/edit?token=[redacted]&id=1"
},
{
"identifier": "146",
"label": "Example content element",
"url": null
}
]
Expected result
The Layout and page breadcrumb entries should navigate back to the current backend module, for example:
/typo3/module/web/layout?token=[redacted]&id=1
The global record_edit route must not be used as the target route for module or page breadcrumb entries.
Clicking “Home” should open that page in Web > Layout. Clicking “Layout” should open the Layout module.
Technical analysis
The issue appears to originate in:
typo3/sysext/backend/Classes/Breadcrumb/RecordBreadcrumbProvider.php
In RecordBreadcrumbProvider::generate(), the target module is determined using the current request route:
$targetModule = $currentModule !== null
? $this->extractRouteIdentifier($request, $currentModule)
: $this->getTargetModule();
During content element editing:
$currentModule->getIdentifier()isweb_layout- the current request route identifier is
record_edit
extractRouteIdentifier() returns the route identifier from the current request without checking whether it is a global route that is unsuitable for page-based breadcrumb navigation:
private function extractRouteIdentifier(
?ServerRequestInterface $request,
ModuleInterface $module
): string {
if (
$request !== null
&& ($routeResult = $request->getAttribute('routing')) !== null
&& ($route = $routeResult->getRoute()) !== null
&& !empty(($routeIdentifier = $route->getOption('_identifier')))
) {
return $routeIdentifier;
}
return $module->getIdentifier();
}
As a result, buildRootline() creates page links using record_edit instead of web_layout.
buildModuleHierarchy() also uses the full current route identifier for the current module node, resulting in the same invalid navigation target.
Possible solution direction
Global record routes such as record_edit should not be reused as navigation targets for module and page breadcrumb nodes.
For such routes, the breadcrumb provider should fall back to the resolved module identifier:
if ($routeIdentifier === 'record_edit') {
return $module->getIdentifier();
}
A more generic solution may be preferable so that other global record routes cannot be used as page or module navigation targets either.
Regression information
This appears to be related to or introduced by issue #108072, “Preserve route actions in breadcrumb navigation”.
That change made the breadcrumb provider preserve the full current route identifier. This is appropriate for module sub-routes, but record_edit is a global record route and should not be preserved for page rootline navigation.
Additional information
The problem can be verified directly in the rendered HTML by inspecting the nodes attribute of the typo3-breadcrumb element.
The issue is limited to navigation through the breadcrumb. The content element form itself loads correctly, and the backend user has sufficient permissions.
Reviews 1
Related issues 1
History 23
-
Gerrit Code Review pushed patch set 1 for main to change 95118 status
NewUnder Review <span data-processor="relativetime" data-value="2026-08-06T05:22:43+00:00" > 08/06/26, 05:22 </span> -
Benni Mack changed Related to #110123 <span data-processor="relativetime" data-value="2026-11-11T09:12:55+00:00" > 11/11/26, 09:12 </span>
-
Benni Mack commented and changed status
Under ReviewClosed <span data-processor="relativetime" data-value="2026-11-11T09:13:05+00:00" > 11/11/26, 09:13 </span>
This has been fixed by #110123 (“[BUGFIX] Fix broken module link in breadcrumb”), merged in main and 14.3. When editing a record via record_edit, the breadcrumb now links the module and page entries to the module itself instead of the record edit route. Closing as resolved there. The related Gerrit change 95118 has been abandoned.