Issue Bug Closed

#110398Insert Records (shortcut): backend preview misses related records

jay pure 08/07/26, 12:14 updated 11/11/26, 21:17

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

  1. Create content elements on different pages (different pid).
  2. On another page, create an “Insert records” element and select several of those elements (e.g. 4).
  3. Save and open the page module.
  4. 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:

  • records still contains all UIDs
  • all referenced tt_content rows exist (hidden=0, deleted=0)
  • their pages exist and are visible
Concrete example:
  • 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.

Likely failure mode:
  1. An earlier resolve for one UID (e.g. 41046) stores a pointer to a greedy result set for a single PID
  2. Later resolve for 41046,149358,80333,104235 hits that pointer
  3. array_filter keeps only UIDs present in the incomplete cached set → preview misses records
Relevant code:

Notes

  • This is not a custom CType: UI label “Insert records”, internal CType value shortcut (Core).
  • Local workaround: custom previewRenderer for shortcut that explodes the raw records field and loads each UID via BackendUtility::getRecord() (bypasses GreedyDatabaseBackend).

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 3

  1. Georg Ringer commented and changed status New Closed <span data-processor="relativetime" data-value="2026-11-11T21:17:25+00:00" > 11/11/26, 21:17 </span>

    this has been fixed with #110663 today, no backport for 13.4 is planned.