Bug #91675

Processed files are not properly re-processed when a crop is defined and the file does not exist

Added by Helmut Hummel over 1 year ago. Updated 12 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-06-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

steps to reproduce:
  1. create and image content element with cropped image
  2. render frontend
  3. delete processed file only
  4. render frontend again

Related issues

Related to TYPO3 Core - Task #91571: Harden internal state handlingClosedOliver Hader2020-06-03

Actions
Related to TYPO3 Core - Feature #65585: Add GUI to enable the editor to set the cropping area for an imageClosedFrans Saris2015-04-15

Actions
Related to TYPO3 Core - Story #75880: Add art direction capabilities to BEClosed2017-02-23

Actions
#1

Updated by Helmut Hummel over 1 year ago

  • Is Regression set to Yes
#2

Updated by Helmut Hummel over 1 year ago

  • Related to Task #91571: Harden internal state handling added
#3

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64907

#4

Updated by Oliver Hader over 1 year ago

  • Related to Feature #65585: Add GUI to enable the editor to set the cropping area for an image added
#5

Updated by Oliver Hader over 1 year ago

  • Related to Story #75880: Add art direction capabilities to BE added
#6

Updated by Oliver Hader over 1 year ago

Actually that seems to be a regression from #75880 - prior to that crop was handled as string and then became the Area object.

  • LocalCropScaleMaskHelper::process gets the configuration array having ['crop' => Area(...)]
  • it performs a json_decode(Area::__toString) in order to retrieve the properties
  • issue #91571 revealed this design flaw by disallowing arbitrary classes during deserialization
#7

Updated by Helmut Hummel over 1 year ago

Oliver Hader wrote:

Actually that seems to be a regression from #75880 - prior to that crop was handled as string and then became the Area object.

I agree. We can fix the initial regression and json_encode the crop property before serializing the configuration.
That actually was my first approach when working on a fix. However this would invalidate all processed files,
because the configuration hash would change.

#8

Updated by Oliver Hader over 1 year ago

BackendUtility::getThumbnailUrl (expects JSON) via ThumbnailViewHelper and does not pass crop information at all, since it's given as Area object. This would be another candidate when switching to plain JSON for passing the cropping information...

#9

Updated by Gerrit Code Review about 1 year ago

Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64913

#10

Updated by Gerrit Code Review about 1 year ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/64914

#11

Updated by Helmut Hummel about 1 year ago

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

Updated by Benni Mack 12 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF