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 #1

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

Actions #2

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?

Actions #3

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

Actions #4

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

Actions #5

Updated by Benni Mack almost 7 years ago

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

Updated by Christian Kuhn almost 7 years ago

  • Has duplicate Bug #80932: installtool: Image-URLs for "combining images"-test seem wrong added
Actions #7

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
Actions #8

Updated by Hannes Strangmeier almost 7 years ago

Hi,

fixed it for me, thx!

Greetings,

Hannes

Actions #9

Updated by Christian Kuhn almost 7 years ago

  • Related to Bug #80964: [Install too] Combining images creates typo3temp into wrong location added
Actions #10

Updated by Christian Kuhn almost 7 years ago

  • Related to deleted (Bug #80964: [Install too] Combining images creates typo3temp into wrong location)
Actions #11

Updated by Christian Kuhn almost 7 years ago

  • Has duplicate Bug #80964: [Install too] Combining images creates typo3temp into wrong location added
Actions #12

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF