Issue Bug Resolved

#107075Missing file can result in an exception for the entire Reports module

Jigal van Hemert 07/11/25, 08:02 updated 10/12/26, 20:05

Description

Now that the consistency of FAL is checked a missing/unreadable file can result in an exception for the entire module.

In \TYPO3\CMS\Reports\Report\Status\FalStatus::checkFolderConsistency() the files are retrieved with a call to \TYPO3\CMS\Core\Resource\Folder::getFiles(). In some cases this will result in subsequent calls to:
  • \TYPO3\CMS\Core\Resource\ResourceStorage->getFilesInFolder()
  • \TYPO3\CMS\Core\Resource\ResourceStorage->getFileByIdentifier()
  • \TYPO3\CMS\Core\Resource\Index\Indexer->createIndexEntry()
  • \TYPO3\CMS\Core\Resource\Index\Indexer->gatherFileInformationArray()
  • \TYPO3\CMS\Core\Resource\ResourceStorage->hashFileByIdentifier()

This will ask the driver for a hash of the file. If this goes wrong the has function will return false and the function will throw an exception. As this will happen inside getFiles() the try-catch in FalStatus will not catch it.

If we add a try-catch around the loop that calls getFiles() then we can’t give much information about the problem. The exception for the hash calculation problem needs to be caught at a lower level.

There are however other places too in the called functions where exceptions can be thrown. These could also make a call to getFiles() rather useless.

Reviews 2

History 36

  1. Georg Ringer commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-12T19:30:09+00:00" > 10/12/26, 19:30 </span>

    Applied in changeset commit:0f70ac6f5fd00ec5b6b6ae34f96a16eac9ce4daa.

  2. Gerrit Code Review pushed patch set 2 for 14.3 to change 96640 status Resolved Under Review <span data-processor="relativetime" data-value="2026-10-12T19:50:34+00:00" > 10/12/26, 19:50 </span>

  3. Georg Ringer commented and changed status Under Review Resolved <span data-processor="relativetime" data-value="2026-10-12T20:05:09+00:00" > 10/12/26, 20:05 </span>

    Applied in changeset commit:36b9a27b5e4c1a4860399a858d1971731d1d4a77.