#104388Levelmedia + FILES cObject results in fatal error for hidden/deleted file references
Description
This is a follow-up to #82844 because not all issues with hidden file references in workspaces have been resolved for TYPO3 11 and 12.
Problem is having workspace-deleted (t3ver_state=2) or hidden=1 file reference in a draft workspace is throwing an exception when previewing that page in draft preview:
> No file reference (sys_file_reference) was found for given UID: “40907”
That can be reproduced with both renderers cObject FILES and FilesProcessor:
page.10 {
variables.files = FILES
variables.files.references.data = levelmedia:-1,slide
dataProcessing.10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
dataProcessing.10.references.data = levelmedia:-1,slide
}Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
Files 1
History 8
-
Philipp Kitzberger changed subject
Workspaces + Levelmedia + FILES cObject results still in fatal errorWorkspaces + Levelmedia + FILES cObject results in fatal error for hidden/deleted file references <span data-processor="relativetime" data-value="2024-07-13T07:42:33+00:00" > 07/13/24, 07:42 </span> -
Philipp Kitzberger changed due date start date Follows #82844 <span data-processor="relativetime" data-value="2024-07-13T07:42:59+00:00" > 07/13/24, 07:42 </span>
-
Jo Hasenau commented and changed attached clipboard-202412201604-xt6bz.png subject
Workspaces + Levelmedia + FILES cObject results in fatal error for hidden/deleted file referencesLevelmedia + FILES cObject results in fatal error for hidden/deleted file references statusNewAccepted <span data-processor="relativetime" data-value="2024-12-20T15:04:43+00:00" > 12/20/24, 15:04 </span> -
Jo Hasenau changed due date start date <span data-processor="relativetime" data-value="2024-12-20T16:57:55+00:00" > 12/20/24, 16:57 </span>
-
Benni Mack commented and changed status
AcceptedNeeds Feedback <span data-processor="relativetime" data-value="2025-08-17T13:36:57+00:00" > 08/17/25, 13:36 </span>Hey Philipp,
I cannot reproduce either of these issues in 13+. Can you verify if this problem is solved in v13 with the new RootlineUtility SQL queries?
-
Philipp Kitzberger commented <span data-processor="relativetime" data-value="2025-08-25T11:04:52+00:00" > 08/25/25, 11:04 </span>
@benni, with TYPO3 13 I don’t see any “levelmedia images” in FE when switching to a workspace at all!
I’ve checked that there’s entries in the ref index (necessary for v13 to work with levelmedia):
SELECT tablename,recuid,field,workspace,ref_table,ref_uid,hidden,ref_hidden FROM sys_refindex WHERE tablename='pages' AND field='media' AND recuid IN (10425,13388); +-----------+--------+-------+-----------+--------------------+---------+--------+------------+ | tablename | recuid | field | workspace | ref_table | ref_uid | hidden | ref_hidden | +-----------+--------+-------+-----------+--------------------+---------+--------+------------+ | pages | 10425 | media | 0 | sys_file_reference | 8942 | 0 | 0 | | pages | 13388 | media | 1 | sys_file_reference | 29254 | 0 | 0 | +-----------+--------+-------+-----------+--------------------+---------+--------+------------+
10425 is the page in live workspace, 13388 in draft.
It doesn’t seem to be related to the FilesProcessor though. This is already empty when on a draft WS:
xxx = TEXT xxx.data = levelmedia:-1 -
Vladimir Falcon commented and changed PHP Version 8.3 <span data-processor="relativetime" data-value="2025-10-13T10:30:08+00:00" > 10/13/25, 10:30 </span>
I was able to reproduce this error without the Workspaces as well, while upgrading ein System from TYPO3 V12 with an outdated sys_refindex table to V13.
Reproduction steps:
- Upgrade from a V12 System with an outdated sys_refindex table and execute all upgrade scripts.
- Call any sub-page containing inheriting a file from a parent page `levelmedia:-1,slide`The error is automatically fixed after executing `referenceindex:update`
-
Georg Ringer commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2026-10-07T19:01:11+00:00" > 10/07/26, 19:01 </span>I could not reproduce this on main (15.0-dev).
Setup: a page with three file references in
media(one visible, one hidden, one visible), rendered withFILESandreferences.data = levelmedia:-1,slide. Additionally a workspace version of the page with a delete placeholder (t3ver_state=2) for one of the visible references.- Live: the hidden reference is skipped, the others are rendered, no exception.
- Workspace preview: the hidden and the workspace-deleted reference are skipped, the remaining one is rendered, no exception.
Since v13,
RootlineUtilityresolves the page’s file references viasys_refindexand already filters hidden records and delete placeholders in the query. Hidden/deleted references therefore never reachFileCollectorand the “No file reference (sys_file_reference) was found” exception is not thrown anymore. The same applies toFilesProcessor, which uses the same code path.The last comment describes the same exception after an upgrade with an outdated
sys_refindex, which is fixed by runningreferenceindex:update.If this still happens on v14+, please provide a reproducible setup including the state of
sys_refindex.
I can confirm that behaviour, but not just within Workspaces. As soon as there is a hidden file reference in the list of sys_file_reference IDs, the FilesProcessor will fail with an exception, because the resourceFactory involved via FileCollector will not find any fileReferenceData.
clipboard-202412201604-xt6bz.png