Project

General

Profile

Actions

Bug #47211

closed

ProcessedFile is persisted in sys_file as well

Added by Oliver Hader over 11 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2013-04-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
hard
Is Regression:
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #47140: ProcessedFile/Thumbnail is always regeneratedClosedOliver Hader2013-04-11

Actions
Related to TYPO3 Core - Bug #48998: FAL files get reindexed in storage null when used with tt_contentClosed2012-09-06

Actions
Actions #1

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

Actions #2

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.

Actions #3

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

Actions #4

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

Actions #5

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);
Actions #6

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

Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

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

Actions #12

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

Actions #13

Updated by Fabien Udriot over 11 years ago

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

Updated by Klaus Hinum over 11 years ago

guess target version should be 6.1.1 and 6.0.6

Actions #15

Updated by Klaus Hinum over 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.

Actions #16

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF