Bug #66614
closed
FAL processed files are deleted
Added by Markus Klein over 9 years ago.
Updated almost 7 years ago.
Category:
File Abstraction Layer (FAL)
Sprint Focus:
Stabilization Sprint
Description
How to reproduce¶
- set `config.noScaleUp = 0` in TS
- add a magic image to RTE
- preview the page in FE
Result: Image broken
Root cause¶
Setting config.noScaleUp causes this line to be executed in typo3/sysext/frontend/Classes/Page/PageGenerator.php:88
$GLOBALS['TYPO3_CONF_VARS']['GFX']['im_noScaleUp'] = isset($GLOBALS['TSFE']->config['config']['noScaleUp'])
? '' . $GLOBALS['TSFE']->config['config']['noScaleUp']
: $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_noScaleUp'];
This makes ['GFX']['im_noScaleUp'] a string, while in BE (when the preview image is generated in RTE) this is only loaded from install tool, where this is a boolean value.
This tiny difference has the effect that the calculated checksums used to determine whether a processed file already exists mismatch and the already generated processed file is deleted from disk.
- Status changed from Accepted 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 http://review.typo3.org/38972
- Description updated (diff)
- Status changed from Under Review to Accepted
- Priority changed from Must have to Should have
- Target version deleted (
next-patchlevel)
- Complexity changed from no-brainer to hard
Abandoned patch.
The issue is way more dramatic.
We have the situation that user experience will differ for BE and FE, if GFX|im_noScaleUp does not match config.noScaleUp.
BE and FE would behave differently.
- Priority changed from Should have to Must have
- Target version set to next-patchlevel
#56147 deals with the issue that processed files are not regenerated. This is related here, since with this bug you can trigger the other bug easily.
Actually, if #56147 would be working, I would have never noticed this bug here.
Regarding this issue: We decided to remove the [GFX] part from the checksum and add a cleanup-util to the Install Tool.
- Target version changed from next-patchlevel to 6.2.13
- Sprint Focus set to Stabilization Sprint
I figured out the whole process now.
- After inserting the magic file into RTE
- a ProcessedFile is generated for the thumb
- When calling FE, it tries to render the file but (due to the data type issue) a new thumb (with new filename) is generated (so a new ProcessedFile)
- Having the click-enlarge static template loaded of RTE, causes it to render the name of the original processed file (from
>cObj>parameters, which contains the parsed RTE content), which has been deleted by the last step, when the new processed file was generated.
- In FE it looks like the thumb-regeneration has failed, which is not true. Just the filename of the original thumb is used, which does not exist anymore.
Ultima ratio:
Fixing the configuration change issue (removing GFX from the checksum) fixes the issue. The remaining FAL handling is totally fine in this case.
Implementation steps are:
- Remove [GFX] from the checksum generated in \TYPO3\CMS\Core\Resource\Processing\AbstractGraphicalTask::getChecksumData()
- Add a cleanup utility to Install-Tool, which allows to remove all processed files (#67071)
- Status changed from Accepted 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 http://review.typo3.org/39644
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39644
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39644
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39644
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39644
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39644
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39644
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39644
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39644
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39644
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39644
Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39644
- Target version changed from 6.2.13 to 7.3 (Packages)
Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/39644
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40143
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Status changed from Resolved to Under Review
Patch set 2 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/40143
- Status changed from Under Review to Resolved
- Status changed from Resolved to Closed
Also available in: Atom
PDF