TYPO3 Exception 1317178604

No file found for given UID.

TYPO3 CMS 6.1.2: Error while uploading previously deleted file

Having deleted a specific file before at the fileadmin it's not possible to upload the same file again without error "No file found for given UID.". You can't open the fileadmin folder containing the file once again uploaded afterwards. At the sys_file table the misbehaving file's entry shows "deleted = 1" before and after upload. Workaround: Deleting the sys_file entry of that file via phpMyadmin. This is forcing TYPO3 fileadmin to create a new sys_file entry with a different uid. Now the folder and it´s content are available again.

Related to Bug #50508

TYPO3 CMS 6.2.x - happened when a tt_news entry had an non-existing image in the bodytext

For some reason the preview did still exist and was shown in BE when editing the news record. But in FE this lead to the exception, because the sys_file record was not there anymore.

EXT:solr + EXT:solrfal

The exception happened when initializing fileadmin/ queue. File record was missing in sys_file but existed in sys_file_reference and sys_file_processedfile. The following SQL helped:

delete from sys_file_reference where uid_local not in (select uid from
sys_file); truncate sys_file_processedfile;
Copied!

The exception can also happen when there are non-existing files for indexing in tx_solr_indexqueue_file and the the records are not deleted with "Clear Index Queue" for unknown reasons. This SQL helped:

truncate tx_solr_indexqueue_file;
Copied!