#108567Renaming file on S3: Exception "File has been deleted"
Description
We’re using TYPO3 v13.4.22 with the aus-driver-amazon-s3 FAL driver on a MinIO object storage.
When renaming a file, the file gets renamed but then a RuntimeException “File has been deleted.” is thrown when the preview image shall be regenerated.
- This only happens with the S3 driver, not with the local file system driver
- This only happens in the File list “Tiles” view, not in the list view.
I still think it is a bug in TYPO3.
What happens
- File gets renamed via AJAX call
- File list in “Tiles” view gets reloaded and wants to render an scaled preview image
- Extbase
ImageService::applyProcessingInstructions()is called and calls$image->process() - An existing
ProcessedFileis found and asked if re-processing is necessary:ProcessedFile::needsReprocessing(). The local storage driver says no, the S3 driver says yes. (Note: The task checksum changes because it contains the file modification time, which changes on S3 – because it does not have a “move file” API endpoint: It re-uploads the file with the new name and then deletes the old one) ProcessedFile::needsReprocessing()deletes itself from storage and marks itself as deleted withsetDeleted()- The processing task re-generates the thumbnail and stores it.
imageServicecallssetCompatibilityValues, which callsImageResource::createFromProcessedFilethat notices that the file object is marked as deleted, and throws the “File has been deleted” exception.
What should happen
When the processing task re-creates the thumbnail, the ProcessedFile object should be marked as “not deleted”.
This could happen in FileProcessingService::processFile() or in the task processor, e.g. DeferredBackendImageProcessor.
Alternatively, a new ProcessedFile instance needs to be used.
Problems
There is no API to reset the “deleted” property on file objects from external classes.
Links
Reviews 5
- main 95698[TASK] Fix CGL violation in ProcessedFileTest
- main 92213[BUGFIX] Mark processed files as not deleted after processing
- 13.4 95678[BUGFIX] Avoid stale deleted state on reprocessed files
- 14.3 95677[BUGFIX] Avoid stale deleted state on reprocessed files
- main 95074[BUGFIX] Avoid stale deleted state on reprocessed files
Related issues 2
History 715
-
Christian Weiske commented <span data-processor="relativetime" data-value="2025-12-23T08:54:44+00:00" > 12/23/25, 08:54 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 92213 status
NewUnder Review <span data-processor="relativetime" data-value="2025-12-23T09:05:05+00:00" > 12/23/25, 09:05 </span> -
Andreas Kießling commented <span data-processor="relativetime" data-value="2026-01-03T14:01:31+00:00" > 01/03/26, 14:01 </span>
Seems like this also fixes my issue in v13 with the local driver.
I update local images with \TYPO3\CMS\Core\Resource\File::setContents which invalidates the thumbnails —> and then the “File has been deleted” message shows up in the next request. -
Gerrit Code Review pushed patch set 2 for main to change 92213 <span data-processor="relativetime" data-value="2026-04-22T06:38:09+00:00" > 04/22/26, 06:38 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 92213 <span data-processor="relativetime" data-value="2026-05-18T08:27:38+00:00" > 05/18/26, 08:27 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 92213 <span data-processor="relativetime" data-value="2026-06-17T12:05:52+00:00" > 06/17/26, 12:05 </span>
-
S P commented <span data-processor="relativetime" data-value="2026-06-23T07:46:33+00:00" > 06/23/26, 07:46 </span>
Not sure whether this is related, but since upgrading to v14 we see this error in our log once in a while
Uncaught TYPO3 Exception: #1329821486: File has been deletedin ext:core/Classes/Resource/AbstractFile.php on line 431
We are only using the local file driver , however. We are not able to reliably reporduce it, but once in a while some content editor manages to create this exception while doing regular content editing stuff in the v14 backend. Never saw this on v13 in the same environment, and we also see no errors in FE output or inconsistent file contents.
To me it seems, there’s some more general race-condition happening, not just for S3.
-
Gerrit Code Review pushed patch set 5 for main to change 92213 <span data-processor="relativetime" data-value="2026-06-23T07:58:42+00:00" > 06/23/26, 07:58 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 95074 <span data-processor="relativetime" data-value="2026-08-03T10:23:14+00:00" > 08/03/26, 10:23 </span>
-
Hannes Bochmann commented <span data-processor="relativetime" data-value="2026-08-31T10:21:58+00:00" > 08/31/26, 10:21 </span>
S P wrote in #note-7:
> Not sure whether this is related, but since upgrading to v14 we see this error in our log once in a while
>
> Uncaught TYPO3 Exception: #1329821486: File has been deleted
>
> in ext:core/Classes/Resource/AbstractFile.php on line 431
>
> We are only using the local file driver , however. We are not able to reliably reporduce it, but once in a while some content editor manages to create this exception while doing regular content editing stuff in the v14 backend. Never saw this on v13 in the same environment, and we also see no errors in FE output or inconsistent file contents.
>
> To me it seems, there’s some more general race-condition happening, not just for S3.I can second that. Still not sure what is going on but sometimes I get the exact same exception during local processing. Not able to reproduce.
-
Simon Schaufelberger changed Related to #110627 <span data-processor="relativetime" data-value="2026-09-04T15:46:28+00:00" > 09/04/26, 15:46 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 95677 <span data-processor="relativetime" data-value="2026-09-07T09:24:06+00:00" > 09/07/26, 09:24 </span>
-
Gerrit Code Review pushed patch set 1 for 13.4 to change 95678 <span data-processor="relativetime" data-value="2026-09-07T09:24:12+00:00" > 09/07/26, 09:24 </span>
-
Benni Mack commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-07T09:40:09+00:00" > 09/07/26, 09:40 </span>Applied in changeset commit:acd959c07ccf6207bbd3470acbc3e21b21575a0f.
Stack trace: Exception
(1/1) #1329821486 RuntimeException File has been deleted. in /var/www/typo3/vendor/typo3/cms-core/Classes/Resource/AbstractFile.php line 594 at TYPO3\CMS\Core\Resource\AbstractFile->getForLocalProcessing() in /var/www/typo3/vendor/typo3/cms-core/Classes/Imaging/ImageResource.php line 60 at TYPO3\CMS\Core\Imaging\ImageResource::createFromProcessedFile() in /var/www/typo3/vendor/typo3/cms-extbase/Classes/Service/ImageService.php line 183 at TYPO3\CMS\Extbase\Service\ImageService->setCompatibilityValues() in /var/www/typo3/vendor/typo3/cms-extbase/Classes/Service/ImageService.php line 70 at TYPO3\CMS\Extbase\Service\ImageService->applyProcessingInstructions() in /var/www/typo3/vendor/typo3/cms-fluid/Classes/ViewHelpers/ImageViewHelper.php line 133 at TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper->render() in /var/www/typo3/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractViewHelper.php line 270 at TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper->initializeArgumentsAndRender() in /var/www/typo3/vendor/typo3fluid/fluid/src/Core/ViewHelper/ViewHelperInvoker.php line 74 at TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperInvoker->invoke() in /var/www/typo3/var/cache/code/fluid_template/Default_action_Filelist_Tiles_936e29912687ec41.php line 353 at Default_action_Filelist_Tiles_936e29912687ec41->{closure:Default_action_Filelist_Tiles_936e29912687ec41::section_f51c20eec3b92e44():316}() in /var/www/typo3/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractConditionViewHelper.php line 95 at TYPO3Fluid\Fluid\Core\ViewHelper\AbstractConditionViewHelper->renderThenChild() in /var/www/typo3/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractConditionViewHelper.php line 64 at TYPO3Fluid\Fluid\Core\ViewHelper\AbstractConditionViewHelper->render() in /var/www/typo3/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractViewHelper.php line 270 at TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper->initializeArgumentsAndRender() in /var/www/typo3/vendor/typo3fluid/fluid/src/Core/ViewHelper/ViewHelperInvoker.php line 74 at TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperInvoker->invoke() in /var/www/typo3/var/cache/code/fluid_template/Default_action_Filelist_Tiles_936e29912687ec41.php line 388 at Default_action_Filelist_Tiles_936e29912687ec41->section_f51c20eec3b92e44() in /var/www/typo3/vendor/typo3fluid/fluid/src/View/AbstractTemplateView.php line 247 at TYPO3Fluid\Fluid\View\AbstractTemplateView->renderSection() in /var/www/typo3/vendor/typo3fluid/fluid/src/ViewHelpers/RenderViewHelper.php line 161 at TYPO3Fluid\Fluid\ViewHelpers\RenderViewHelper->render() in /var/www/typo3/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractViewHelper.php line 270 at TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper->initializeArgumentsAndRender() in /var/www/typo3/vendor/typo3fluid/fluid/src/Core/ViewHelper/ViewHelperInvoker.php line 74 at TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperInvoker->invoke() in /var/www/typo3/var/cache/code/fluid_template/Default_action_Filelist_Tiles_936e29912687ec41.php line 644 at Default_action_Filelist_Tiles_936e29912687ec41->{closure:Default_action_Filelist_Tiles_936e29912687ec41::render():616}() in /var/www/typo3/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractViewHelper.php line 291 at TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper->renderChildren() in /var/www/typo3/vendor/typo3fluid/fluid/src/ViewHelpers/ForViewHelper.php line 133 at TYPO3Fluid\Fluid\ViewHelpers\ForViewHelper->render() in /var/www/typo3/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractViewHelper.php line 270 at TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper->initializeArgumentsAndRender() in /var/www/typo3/vendor/typo3fluid/fluid/src/Core/ViewHelper/ViewHelperInvoker.php line 74 at TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperInvoker->invoke() in /var/www/typo3/var/cache/code/fluid_template/Default_action_Filelist_Tiles_936e29912687ec41.php line 659 at Default_action_Filelist_Tiles_936e29912687ec41->render() in /var/www/typo3/vendor/typo3fluid/fluid/src/View/AbstractTemplateView.php line 158 at TYPO3Fluid\Fluid\View\AbstractTemplateView->render() in /var/www/typo3/vendor/typo3/cms-fluid/Classes/View/FluidViewAdapter.php line 57 at TYPO3\CMS\Fluid\View\FluidViewAdapter->render() in /var/www/typo3/vendor/typo3/cms-filelist/Classes/FileList.php line 289 at TYPO3\CMS\Filelist\FileList->renderTiles() in /var/www/typo3/vendor/typo3/cms-filelist/Classes/FileList.php line 379 at TYPO3\CMS\Filelist\FileList->render() in /var/www/typo3/vendor/typo3/cms-filelist/Classes/Controller/FileListController.php line 400 at TYPO3\CMS\Filelist\Controller\FileListController->generateFileList() in /var/www/typo3/vendor/typo3/cms-filelist/Classes/Controller/FileListController.php line 251 at TYPO3\CMS\Filelist\Controller\FileListController->processRequest() in /var/www/typo3/vendor/typo3/cms-filelist/Classes/Controller/FileListController.php line 240 at TYPO3\CMS\Filelist\Controller\FileListController->handleRequest() in /var/www/typo3/vendor/typo3/cms-backend/Classes/Http/RouteDispatcher.php line 82Stack trace: setDeleted() on
ProcessedFile