Bug #44073

Checksum needs to be updated after file processing

Added by Helmut Hummel over 2 years ago. Updated over 2 years ago.

Status:Resolved Start date:2012-12-17
Priority:Should have Due date:
Assigned To:- % Done:

100%

Category:File Abstraction Layer (FAL) Spent time: -
Target version:-
TYPO3 Version:6.0 Is Regression:
PHP Version: Sprint Focus:
Complexity:

Description

When recreating an already processed file the LocalImageProcessor
updates the width, height and filesize of the new image but not
the checksum.

Because of that the file will be deleted in FileProcessingService
when $processedFile->isProcessed() is called. Since the checksum
is wrong this call assumes that the file needs to be recreated and
deletes the "old" file on the go.

This will lead to an exception in this request, when getPublicUrl is
called on this object.

Since the checksum is not only based on the processing configuration
but also on the graphic configuration, these exceptions only occur
when the graphic configuration is changes (e.g. in a deploy scenario).

The problem can easily be reproduced by enforcing
a change of the GFX configuration e.g. by adding the
following line to AdditionalConfiguration.php

$GLOBALS['TYPO3_CONF_VARS']['GFX']['foo'] = uniqid()

Then an exception is thrown for every processed file on every request.


Related issues

related to Core - Bug #44616: Image caching broken for im_noScaleUp = 1 Closed 2013-01-17
related to Core - Bug #45168: Wrong image displayed in FE if not resized Resolved 2013-02-05
related to Core - Bug #44645: Preview images don't get a new filename after overwriting... Resolved 2013-01-18

Associated revisions

Revision 7d88ffce
Added by Helmut Hummel over 2 years ago

[BUGFIX] Update checksums after file processing

When recreating an already processed file the LocalImageProcessor
updates the width, height and filesize of the new image but not
the checksum.

Because of that the file will be deleted in FileProcessingService
when $processedFile->isProcessed() is called. Since the checksum
is wrong this call assumes that the file needs to be recreated and
deletes the "old" file on the go.

This will lead to an exception in this request, when getPublicUrl is
called on this object.

Fixes: #44073
Releases: 6.1, 6.0

Change-Id: Ib2df87b54866262e0092fbb24b4222f0b298e9d6
Reviewed-on: https://review.typo3.org/17207
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel

Revision ae6318c9
Added by Helmut Hummel over 2 years ago

[BUGFIX] Update checksums after file processing

When recreating an already processed file the LocalImageProcessor
updates the width, height and filesize of the new image but not
the checksum.

Because of that the file will be deleted in FileProcessingService
when $processedFile->isProcessed() is called. Since the checksum
is wrong this call assumes that the file needs to be recreated and
deletes the "old" file on the go.

This will lead to an exception in this request, when getPublicUrl is
called on this object.

Fixes: #44073
Releases: 6.1, 6.0

Change-Id: Ib2df87b54866262e0092fbb24b4222f0b298e9d6
Reviewed-on: https://review.typo3.org/17207
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
Reviewed-on: https://review.typo3.org/17208

History

#1 Updated by Gerrit Code Review over 2 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/17207

#2 Updated by Gerrit Code Review over 2 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/17208

#3 Updated by Helmut Hummel over 2 years ago

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

#4 Updated by Andreas Wolf over 2 years ago

The triggers a sham bug - the filename of the processed file is not updated, so it seems as if the relation between the processed file and the original file is broken. See #45168 and #44616 for details.

Don't see this as a blame, this is just a note so nobody searches for this "bug" again for hours :-/.

Also available in: Atom PDF