#106906Catch ResourceDoesNotExistException in FileCollector
Description
In case the reference index ( sys_refindex ) is not up to date, the FilesProcessor can throw an exception for missing or hidden sys_file_references .
Steps to reproduce:- Add file reference in page properties
- Use FileProcessor to add it into page template, like
page.10.dataProcessing {
...
60 = files
60 {
references.fieldName = media
references.data = levelmedia:-1, media
}
- In the database, set the sys_file_reference to hidden=1
I think the FileCollector or at least the FilesProcessor should catch the ResourceDoesNotExistException
Slack discussion: https://typo3.slack.com/archives/C025BQLFA/p1750246320568819
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 3
-
Garvin Hicking commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2025-06-18T15:39:43+00:00" > 06/18/25, 15:39 </span> -
Georg Ringer changed Related to #109710 <span data-processor="relativetime" data-value="2026-08-16T10:44:46+00:00" > 08/16/26, 10:44 </span>
-
Georg Ringer commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2026-08-16T10:45:04+00:00" > 08/16/26, 10:45 </span>closing as duplicate of #109710
I would argue that the sys_refindex is by now a vital integrity backbone. We need to rely on it.
IMO file collections should not just silently discard assigned images. Think of a site that uses images to state legal contents. Just omitting such an image could make the whole page rendering faulty and sibject to lawsuits. I this case, receiving a full error would be the the sane action.
If something is not in the refindex, throwing exceptions for unexpected behavior is a common approach in TYPO3. So we should focus on why your sys_refindex might not get updated.
If I read the thread right, this was not caused by TYPO3 internal handling but outside modification or missing refindex update after a TYPO3 update?