#110398Insert Records (shortcut): backend preview misses related records
Description
Summary
Backend page module preview for content type “Insert records” (CType shortcut) often shows fewer related records than stored in the records field.
This is inconsistent: newly created Insert Records may show multiple items, while existing ones referencing content on different pages often show only a subset (e.g. 1 of 4, or 2 of 3).
Frontend rendering and the stored records value are correct. Only the backend preview is wrong.
Environment
- TYPO3 13.4.x (reproduced on 13.4.33)
- CType:
shortcut(“Insert records” – Core content type) - Field:
tt_content.records(type=group,allowed=tt_content,maxitems=200)
Steps to reproduce
- Create content elements on different pages (different
pid). - On another page, create an “Insert records” element and select several of those elements (e.g. 4).
- Save and open the page module.
- Optionally reload / view pages that also contain some of the referenced elements, then return to the Insert Records page.
Expected
Preview lists all referenced records from records.
Actual
Preview shows only a subset (sometimes only one), even though:
recordsstill contains all UIDs- all referenced
tt_contentrows exist (hidden=0,deleted=0) - their pages exist and are visible
- Insert Records UID
45113,records = 41046,149358,80333,104235 - All 4 targets exist on different PIDs (
2857,6933,9934,2088) - Page module preview showed only 1 item
Suspected cause
StandardContentPreviewRenderer resolves shortcut relations via the Record API (RecordFactory / RelationResolver / GreedyDatabaseBackend), introduced with Feature #103581.
GreedyDatabaseBackend uses runtime cache pointers per UID and assumes UIDs come from the same PID (“same result set”). That assumption is wrong for Insert Records, whose records field commonly references content across multiple pages.
- An earlier resolve for one UID (e.g.
41046) stores a pointer to a greedy result set for a single PID - Later resolve for
41046,149358,80333,104235hits that pointer array_filterkeeps only UIDs present in the incomplete cached set → preview misses records
typo3/sysext/backend/Classes/Preview/StandardContentPreviewRenderer.php(case 'shortcut')typo3/sysext/core/Classes/Domain/Persistence/GreedyDatabaseBackend.php(getRowsFromCache/setCachepointer logic)- Related: https://github.com/TYPO3/typo3/commit/43a284ca21172e32a3d4c022d3c65e7d930b2f0e
- Changelog: https://docs.typo3.org/c/typo3/cms-core/main/en-us/Changelog/13.3/Feature-103581-AutomaticallyTransformTCAFieldValuesForRecordObjects.html
Notes
- This is not a custom CType: UI label “Insert records”, internal CType value
shortcut(Core). - Local workaround: custom
previewRendererforshortcutthat explodes the rawrecordsfield and loads each UID viaBackendUtility::getRecord()(bypasses GreedyDatabaseBackend).
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 2
History 3
-
Georg Ringer changed Related to #110663 <span data-processor="relativetime" data-value="2026-11-11T21:16:49+00:00" > 11/11/26, 21:16 </span>
-
Georg Ringer commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-11-11T21:17:25+00:00" > 11/11/26, 21:17 </span> -
Georg Ringer changed Related to #109594 <span data-processor="relativetime" data-value="2026-11-11T21:19:33+00:00" > 11/11/26, 21:19 </span>
this has been fixed with #110663 today, no backport for 13.4 is planned.