Project

General

Profile

Actions

Bug #82667

closed

Passing a FAL file reference as data to the f:cObject view helper causes the creation of unwished fal-tempfiles in typo3temp/var/transient

Added by Kai Strecker over 6 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2017-10-04
Due date:
% Done:

0%

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

Description

We often do something like the following to generate images (image is a FAL object).

<f:cObject typoscriptObjectPath="lib.imageRenderer" data="{image}" />

We do this mainly to generate multiple versions with different resolutions, which then get chosen and loaded via javascript in the web browser.

But there is a problem:

  1. The CObjectViewHelper calls \TYPO3\CMS\Extbase\Reflection\ObjectAccess::getGettableProperties($data).
  2. The getGettableProperties method finds the \TYPO3\CMS\Core\Resource\FileReference::getForLocalProcessing method and calls it to get the property.
  3. getForLocalProcessing has the parameter "writable" which is true by default and thus causes the creation of a fal-tempfile in the typo3temp/var/transient directory.

Those fal-tempfiles are always unwished (at least in our case), because lib.imageRenderer is a IMAGE cObject and thus creates the temp files on its own.

I think it's generally a bad idea, to create a fal-tempfile, if someone passes a FileReference to the CObjectViewHelper.

This problem also exists in TYPO3 v7.

Actions

Also available in: Atom PDF