#111080Redirect to a record link ("t3://record?...") fails with fatal error
Description
A redirect whose target is a record link, e.g. t3://record?identifier=content&uid=100, can not be resolved. The request ends with
bc. Error: Call to a member function getId() on null
in DatabaseRecordLinkBuilder::getPageTsConfig()
Cause
RedirectService::bootFrontendController() builds a request containing frontend.page.information, frontend.typoscript, routing and frontend.cache.instruction, but only stores it inside the ContentObjectRenderer. getUriFromCustomLinkDetails() then passes the original request (plus currentContentObject) to the link builder, so all these attributes are missing.
Link builders read them from the passed request: DatabaseRecordLinkBuilder needs the page information (page TSconfig) and config.recordLinks, PageLinkBuilder reads config.* from frontend.typoscript.
How to reproduce
- Configure a record link handler (page TSconfig
TCEMAIN.linkHandler.*and TypoScriptconfig.recordLinks.*) - Create a redirect with target
t3://record?identifier=<identifier>&uid=<uid> - Call the source path of the redirect
Solution
Use the request of the booted ContentObjectRenderer instead of the original request when calling buildLink():
bc. $request = $contentObjectRenderer->getRequest()->withAttribute(‘currentContentObject’, $contentObjectRenderer);
Reviews 1
History 23
-
Gerrit Code Review pushed patch set 1 for main to change 96719 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-15T12:01:41+00:00" > 10/15/26, 12:01 </span> -
Georg Ringer commented and changed status
Under ReviewRejected <span data-processor="relativetime" data-value="2026-10-15T12:05:46+00:00" > 10/15/26, 12:05 </span> -
Georg Ringer changed Duplicates #109912 <span data-processor="relativetime" data-value="2026-10-15T12:05:53+00:00" > 10/15/26, 12:05 </span>
duplicate of #109912