Actions
Bug #62184
closedException using GIFBUILDER in css_styled_content texpic renderer
Status:
Closed
Priority:
Should have
Assignee:
Category:
Content Rendering
Target version:
Start date:
2014-10-13
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.6
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Stabilization Sprint
Description
If the default rendering of tt_content.image was modified so an GIFBUILDER is used and an image has an link the system break at the try to run "imageLinkWrap".
Way to reproduce:
- Greate an image content element with one or more images
- Assign at least one image an link
- Put following in your typoscript:
tt_content.image.20.1 { file > file = GIFBUILDER file { format = png XY = [10.w],[10.h] 10 = IMAGE 10.file { import.data.cObject = TEXT import.data.cObject.data = register:ORIG_FILENAME import.data.cObject.wrap = file:|:uid treatIdAsReference = 1 maxW = {$styles.content.imgtext.maxW} maxW.override.field = register:maxImageWidth maxW.override.override.field = imagewidth maxH.override.field = imageheight } 20 = TEXT 20 { text.data.cObject = TEXT text.data.cObject.data = register:ORIG_FILENAME text.data.cObject.wrap = file:|:copyright fontSize = 11 fontColor = #000000 offset = 10,17 } } }
Now open the page and you got following Exception:
#1401732564: Invalid file identifier given. It must be of type string and not empty. "NULL" given. (More information) InvalidArgumentException thrown in file /var/www/vhosts/domain.tld/TYPO3/typo3_src-6.2.5/typo3/sysext/core/Classes/Resource/ResourceFactory.php in line 373.
I could fix this issue by adding the following lines to ContentObjectRenderer at line 5231 right after $imageResource = $gifCreator->getImageDimensions($theImage);
$imageResource['origFile'] = $theImage; $imageResource['originalFile'] = $theImage;
Actions