Bug #51804
closedSet absPrefix in GraficalFunctions to PATH_site
100%
Description
To make GifBuilder and GraficalFunctions work in
backend context, it is needed to set the absolute
path prefix for processed images to document root.
It works in FE context, because the current working
directory of PHP is document root, but fails in
BE context, as the CWD can be anything, depending
on the location of the executing script.
Always setting absPrefix to PATH_site will not affect
frontend rendering and will make the FAL file
processing with context crop scape mask also
work in BE context.
Updated by Gerrit Code Review about 11 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23652
Updated by Gerrit Code Review about 11 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23652
Updated by Gerrit Code Review almost 11 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/23652
Updated by Helmut Hummel almost 11 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset a2a6d91b84da8885e446aa920c152177d31ed02e.
Updated by Alexander von Drach over 10 years ago
This is not fully fixed, scaling (GraphicalFunctions::scale) still doesn't work.
(error occurred in 6.1.7, but still seems to be present in the current master)
GraphicalFunctions::scale() generates a random file name with GraphicalFunctions::randomName(), but that returns a relative path starting with typo3temp. Saving the image resource to that path fails in the following.
I guess it's not wise to add absPrefix already in randomName() (might also be used for URLs?), but it should be used in scale(), i.e.
$theFile = $this->absPrefix . $tmpStr . '.' . $this->gifExtension;
instead of
$theFile = $tmpStr . '.' . $this->gifExtension;