Bug #47211
closedProcessedFile is persisted in sys_file as well
100%
Description
New ProcessedFile objects are stored in sys_file as well instead of just being available in sys_file_processedfile.
The solutions for the time being is to check whether "/_processed_/" is used in the beginning of the file identifier to be created.
Based on this result, either a regular File or ProcessedFile shall be generated.
Updated by Klaus Hinum over 11 years ago
With 6.0.5rc1 still unreferenced sys_file entries. For a used image in a tt_content element I get entries in sys_file for
- the original file from the storage /Notebooks/Apple/macbookpro17_front.jpg - which is fine
- /_processed_/preview_macbookpro17_front_ba969b9235... for the processed preview file in the backend (why that?)
- /typo3temp/_processed_/csm_macbookpro17_front_d819... for the processed frontend file (why is it in typo3temp and why an entry in sys_file).
- /fileadmin/Notebooks/Apple/macbookpro17_front.jpg ... another entry with storage 0 (altough fileadmin is storage 1), this time for the click enlarge file (as the original is taken without shrinking)
So I get 4 entries instead one, and therefore FAL also breaks replication in our case.
Can anyone explain why there are 4 entries? In my point of view there should be only one in sys_file and three in sys_file_processedfile (for the thumbnail, the scaled and click enlarge / original images).
Update: more information what happens
Updated by Fabien Udriot over 11 years ago
The problem appears more generally as soon as getProperties
is called from a file object. FAL will try, by all means, indexing the file (storing the file into sys_file, in other word)
I suggest adding a method telling a File not be indexed by the API. This is particularly useful if you want to create objects but don't want them to be persisted.
As info, for the need of Media (which extends File), I had to add a convenient method which is not the nicest. From my scope, it was for solving some recursive Exception appearing when unit testing. Besides, I remember some other cases where such infinite recursion Exception happened, if a file could not be indexed for some reasons.
Updated by Gerrit Code Review over 11 years ago
- Status changed from New to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20437
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20437
Updated by Fabien Udriot over 11 years ago
As info, here is the code I am using generating a thumbnail. Normally, this would create a processed file and store the info in sys_file_processedfile
. But following a regression in FAL, it is now put into sys_file (with all the consequences).
$configuration['width'] = $this->file->getProperty('width'); $configuration['height'] = $this->file->getProperty('height'); $taskType = \TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW; /** @var $processedFile \TYPO3\CMS\Core\Resource\ProcessedFile */ $processedFile = $this->file->process($taskType, $configuration);
Updated by Gerrit Code Review over 11 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20437
Updated by Gerrit Code Review over 11 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20437
Updated by Gerrit Code Review over 11 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20437
Updated by Gerrit Code Review over 11 years ago
Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20437
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/20872
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch TYPO3_6-1 has been pushed to the review server.
It is available at https://review.typo3.org/20872
Updated by Gerrit Code Review over 11 years ago
Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/20873
Updated by Fabien Udriot over 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset f94f4eb1dc800a320902a31d897aa69904d7c6b9.
Updated by Klaus Hinum about 11 years ago
guess target version should be 6.1.1 and 6.0.6
Updated by Klaus Hinum about 11 years ago
what about all the sys_file entries from the processed files. Can we delete them savely? E.g. delete all files that are in the _processed directory in the sys_file database.
Updated by Riccardo De Contardi almost 7 years ago
- Status changed from Resolved to Closed