Project

General

Profile

Actions

Bug #51804

closed

Set absPrefix in GraficalFunctions to PATH_site

Added by Helmut Hummel over 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Must have
Assignee:
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2013-09-06
Due date:
% Done:

100%

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

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.

Actions #1

Updated by Gerrit Code Review over 10 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

Actions #2

Updated by Gerrit Code Review over 10 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23652

Actions #3

Updated by Gerrit Code Review over 10 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

Actions #4

Updated by Helmut Hummel over 10 years ago

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

Updated by Alexander von Drach about 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;

Actions #6

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF