Bug #80690
closedInstall-Tool testsetup uses deprecated function tempPath() for combine image and gdlib
100%
Description
Hi,
it seems as if the combine-image and gdlib tests in the installtool use the deprecated function tempPath.
This happens in typo3/sysext/install/Classes/Controller/Action/Tool/TestSetup.php
In the initializeImageProcessor() absPrefix was introduced (line 659) and thereby replaced tempPath:
$imageProcessor->absPrefix = PATH_site;
instead of
$imageProcessor->tempPath = PATH_site . 'typo3temp/';
But in getImagesPath() (line 704) tempPath is still used. This leads to an incomplete Path for example for combineImages() where $resultfile() is still based on getImagesPath (thereby using tempPath):
$resultFile = $this->getImagesPath($imageProcessor) . $imageProcessor->filenamePrefix
. StringUtility::getUniqueId($imageProcessor->alternativeOutputKey . 'combine1') . '.jpg';
The executed gm/convert-Commands now try to create files outsite of PATH_site, because it is no longer part of the created Path.
To make it a bit more understandable (since i am not a developer):
The test for Combine Images in the Install-Tool now creates such a command:
'/usr/local/bin/gm' 'convert' +profile '*' -colorspace GRAY +matte '/my/path/site/typo3/sysext/install/Resources/Public/Images/TestInput/MaskBlackWhite.gif[0]' 'typo3temp/var/transient/23faa83fe8fd5311e55d581a578e503a.png'
Before it would create a correct destination path like this:
'/usr/local/bin/gm' 'convert' +profile '*' -colorspace GRAY +matte '/my/path/site/typo3/sysext/install/Resources/Public/Images/TestInput/MaskBlackWhite.gif0' '/my/path/site/typo3temp/var/transient/23faa83fe8fd5311e55d581a578e503a.png'
I would assume that the intended behaviour is to use absPrefix in $resultFile to determine the correct path for the destination file (combined with typo3temp and the filenamePrefix etc.)
gdlib() uses the same thing for $outputFile which leads to a similar behaviour.
imageMagickConvert() seems not be affected, thereby scaling etc. works.
Cheers,
Hannes
Updated by Gerrit Code Review almost 7 years 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/52527
Updated by Benni Mack almost 7 years ago
Hey Hannes,
I created a patch for that, could you see if that fixes your issue please?
Updated by Gerrit Code Review almost 7 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52527
Updated by Gerrit Code Review almost 7 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52536
Updated by Benni Mack almost 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset c2b182bea4513c113ec54761e76e576dd5ee8132.
Updated by Christian Kuhn almost 7 years ago
- Has duplicate Bug #80932: installtool: Image-URLs for "combining images"-test seem wrong added
Updated by Christian Kuhn almost 7 years ago
- Related to Bug #80890: 8.7.1 Test setup & Combining images. Images are not generated correctly. added
Updated by Hannes Strangmeier almost 7 years ago
Hi,
fixed it for me, thx!
Greetings,
Hannes
Updated by Christian Kuhn almost 7 years ago
- Related to Bug #80964: [Install too] Combining images creates typo3temp into wrong location added
Updated by Christian Kuhn almost 7 years ago
- Related to deleted (Bug #80964: [Install too] Combining images creates typo3temp into wrong location)
Updated by Christian Kuhn almost 7 years ago
- Has duplicate Bug #80964: [Install too] Combining images creates typo3temp into wrong location added