Project

General

Profile

Actions

Bug #80690

closed

Install-Tool testsetup uses deprecated function tempPath() for combine image and gdlib

Added by Hannes Strangmeier about 7 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
-
Start date:
2017-04-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #80890: 8.7.1 Test setup & Combining images. Images are not generated correctly.Closed2017-04-19

Actions
Has duplicate TYPO3 Core - Bug #80932: installtool: Image-URLs for "combining images"-test seem wrongClosed2017-04-21

Actions
Has duplicate TYPO3 Core - Bug #80964: [Install too] Combining images creates typo3temp into wrong locationClosed2017-04-22

Actions
Actions

Also available in: Atom PDF