Project

General

Profile

Actions

Bug #82672

closed

Fileadmin garbage collection is failing

Added by Michael Buergi over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2017-10-04
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

Description

The scheduler job "Fileadmin garbage collection" is failing with the error message:

Execution failed: 1314516809, File /foo/bar/fileadmin/subfolder/_recycler_ does not exist.

I'm using typo3 v7.6.23

A look at the source code reveals that this cannot work and never has. That's strange because it was reviewed and tested, allegedly:

https://forge.typo3.org/issues/78473
commit: a43deabd6728526b1237b4d76a369baffd211c27

It's not working because the method getFileObjectFromCombinedIdentifier() receives wrong input:

should be something like: 'fileadmin/subfolder/_recycler_/garbage.txt'
but is: '/foo/bar/fileadmin/subfolder/_recycler_'

Maybe the version from master does run in v7? It seems to be much cleaner and better.

Regards
Michael

Actions #1

Updated by Alexander Grein over 6 years ago

I can confirm this bug.

There is a problem inside the method cleanupRecycledFiles of the typo3/sysext/scheduler/Classes/Task/RecyclerGarbageCollectionTask.php class.

It is this call in line 93:

$fileObject = ResourceFactory::getInstance()->getFileObjectFromCombinedIdentifier($filePath);

The passed parameter is an absolute path without the filename, but should be a relative path to a file from the web root view to work as an identifier for the resource factory.
If you change this line to
$fileObject = ResourceFactory::getInstance()->getFileObjectFromCombinedIdentifier(substr($fileName, strlen(PATH_site)));
the error message of this issue will disappear.

Actions #2

Updated by Sebastian Hofer over 6 years ago

  • Sprint Focus set to On Location Sprint
Actions #3

Updated by Gerrit Code Review over 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54839

Actions #4

Updated by Gerrit Code Review over 6 years ago

Patch set 2 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54839

Actions #5

Updated by Gerrit Code Review over 6 years ago

Patch set 3 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54839

Actions #6

Updated by Sebastian Hofer over 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #7

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF