#110507PageLinkMessageProvider crashes with RecordPropertyNotFoundException when linking to page with fragment pointing to content element with CType not containing header
Description
Version:
14.3.6
Description:
PageLinkMessageProvider::generateLinkToContentElement() (line 106) unconditionally calls $record->get(‘header’) on a tt_content record resolved from the link fragment. In TYPO3 14, the Record class is TCA-schema-aware and only exposes properties defined in the CType’s types showitem.
Reproduction: Create a page (doktype 3, “Link”) with link = t3://page?uid=XXXX#YYYY where YYYY is the uid of a tt_content record whose CType does not include header in its TCA types showitem. Open the page module for the link page — crash.
Error:
RecordPropertyNotFoundException: Record property “header” is not available.
#0 Record.php:131
#1 PageLinkMessageProvider.php:106 (generateLinkToContentElement)
#2 PageLinkMessageProvider.php:163 (getMessageForPageTypeLinkToPage)
Suggested fix: PageLinkMessageProvider::generateLinkToContentElement() should handle the case where header is not available for the record’s CType — either by catching RecordPropertyNotFoundException or by using BackendUtility::getRecordTitle() which already handles this gracefully.
Note: BackendUtility::getRecordTitle() is already used in getMessageForPageTypeLinkToRecord() (line 280) for the same purpose — the generateLinkToContentElement() method should use it too instead of directly calling $record->get(‘header’).
Reviews 5
- 14.3 96022[BUGFIX] Use BackendUtility::getRecordTitle() in PageLinkMessageProvider
- main 95374[BUGFIX] Use BackendUtility::getRecordTitle() in PageLinkMessageProvider
- 14.3 95373[BUGFIX] Use BackendUtility::getRecordTitle() in PageLinkMessageProvider
- main 95372[BUGFIX] Use BackendUtility::getRecordTitle() in PageLinkMessageProvider
- main 95371[BUGFIX] Use BackendUtility::getRecordTitle() in PageLinkMessageProvider
Files 2
History 38
-
Gerrit Code Review pushed patch set 1 for main to change 95371 status
NewUnder Review 08/20/26, 16:01 -
Gerrit Code Review pushed patch set 1 for main to change 95372 08/20/26, 16:03
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 95373 08/20/26, 16:09
-
Gerrit Code Review pushed patch set 1 for main to change 95374 08/20/26, 16:25
-
Steffen Mächtel changed category 08/21/26, 08:40
-
Steffen Mächtel commented 08/25/26, 14:43
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 96022 09/23/26, 21:35
-
Steffen Mächtel commented and changed status
Under ReviewResolved done0 %100 % 09/23/26, 21:40Applied in changeset commit:2fb7a79e78297b5573c9a89229a3d8544384e50c.
Active Gerrit change: https://review.typo3.org/c/Packages/TYPO3.CMS/+/95374 (3 older changes abandoned — wrong branch, wrong order, wrong change-id)