Issue Bug Closed

#82235CObject Viewhelper with image object as data attribute leads to flodding of typo3temp folder

Dimitri König 08/29/17, 11:56 updated 05/07/19, 15:26

Description

Hi there

There is an issue with cObject Viewhelper and image filereferences as data attribute, wether it’s v7 or v8.

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

This results in the viewhelper calling all gettable methods on that image object to get an data array:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/fluid/Classes/ViewHelpers/CObjectViewHelper.php#L109

But due to an interesting getter method for local copies of that image you get you typo3temp folder flooded:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/Resource/FileReference.php#L475

Current workaround which is not that good due to some data which gets lost is this:

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

It still would be better and more useful to actually be able to give a whole object as a data attribute to use some properties as one likes.

Thx
Best
Dimitri

Reviews 0

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