Bug #47140

ProcessedFile/Thumbnail is always regenerated

Added by Oliver Hader over 6 years ago. Updated about 2 years ago.

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

100%

TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
nightmare
Is Regression:
Sprint Focus:

Description

A ProcessedFile/Thumbnail is always regenerated even if there are not modifications to the original file.

The reason for this spread all over the ProcessedFile handling and boils down to a new ProcessedFile is being persisted in the file-system by using a regular ResourceStorage::addFile() call that results in a plain File object. The indexer then tries to load this file and will create a new UID for the thumbnail in sys_file. This uid value is then used to update(!) the sys_file_processedfile entry - which fails since the uid was taken from sys_file.

Since this is spead a lot, the only chance to overcome this, is to halt the indexer if the file identifier starts with the processing folder identifier.


Related issues

Related to TYPO3 Core - Bug #45221: Images with whitespaces in their names are not stored correctly in _processed_ Closed 2013-02-06
Related to TYPO3 Core - Bug #47211: ProcessedFile is persisted in sys_file as well Closed 2013-04-14
Related to Media Management - Bug #47782: Regenerated and indexed thumbnails of uploaded images Resolved 2013-05-01

Associated revisions

Revision c6834d8c (diff)
Added by Oliver Hader over 6 years ago

[BUGFIX] ProcessedFile/Thumbnail is always regenerated

A ProcessedFile/Thumbnail is always regenerated even if there
are not modifications to the original file.

The reasons for this spread all over the ProcessedFile handling
and boils down to a new ProcessedFile is being persisted in the
file-system by using a regular ResourceStorage::addFile() call
that results in a plain File object. The indexer then tries to
load this file and will create a new UID for the thumbnail in
sys_file. This uid value is then used to update(!) the
sys_file_processedfile entry - which fails since the uid
was taken from sys_file.

The bug was introduced in
I53e4eb42def291ba88ce18209a348b1e2f592185 were the
processedFile is updated with information of a File object and
the wrong uid is transfered as property.

Fixes: #47140
Releases: 6.1, 6.0
Change-Id: I4252b237d6022485c51ad32a7f956f5afcda8c08
Reviewed-on: https://review.typo3.org/19810
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader

Revision c9a27c2b (diff)
Added by Oliver Hader over 6 years ago

[BUGFIX] ProcessedFile/Thumbnail is always regenerated

A ProcessedFile/Thumbnail is always regenerated even if there
are not modifications to the original file.

The reasons for this spread all over the ProcessedFile handling
and boils down to a new ProcessedFile is being persisted in the
file-system by using a regular ResourceStorage::addFile() call
that results in a plain File object. The indexer then tries to
load this file and will create a new UID for the thumbnail in
sys_file. This uid value is then used to update(!) the
sys_file_processedfile entry - which fails since the uid
was taken from sys_file.

The bug was introduced in
I53e4eb42def291ba88ce18209a348b1e2f592185 were the
processedFile is updated with information of a File object and
the wrong uid is transfered as property.

Fixes: #47140
Releases: 6.1, 6.0
Change-Id: I4252b237d6022485c51ad32a7f956f5afcda8c08
Reviewed-on: https://review.typo3.org/19809
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader

History

#1 Updated by Gerrit Code Review over 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/19809

#2 Updated by Gerrit Code Review over 6 years ago

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19810

#3 Updated by Gerrit Code Review over 6 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19810

#4 Updated by Gerrit Code Review over 6 years ago

Patch set 2 for branch TYPO3_6-0 has been pushed to the review server.
It is available at https://review.typo3.org/19809

#5 Updated by Oliver Hader over 6 years ago

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

#6 Updated by Riccardo De Contardi about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF