Issue Bug Closed

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

Kai Strecker 10/04/17, 11:00 updated 03/24/20, 16:37

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.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.