Bug #80175
closedimagecreatetruecolor(): Invalid image dimensions on Image import with LOAD_REGISTER in CE menu
0%
Description
Dear TYPO3 Team,
I updated my TYPO 8.4 to 8.6.1. Many things has changed and so I change all my fluid templates. But one thing I could not solve and I even don't know the exact problem. So I can giv e before-after example:
I had a TS Fluid combination that rendered a "Menu of Subpages" with square PNG images (GIFBUILDER) and centered page media image. The Fluid in Partials/Menu/Type-1.html was:
<f:for each="{pages}" as="page"> <div class="item"> <figure class="table"> <f:link.page pageUid="{page.uid}" class="imagelink"> <f:cObject typoscriptObjectPath="lib.pageimage" data="{uid:'{page.uid}'}" /> </f:link.page> </figure> </div>
The TS:
lib.pageimagethumb = FILES lib.pageimagethumb { references { table = pages uid.dataWrap= {field: uid} fieldName = media } begin = 0 maxItems = 1 renderObj = COA renderObj { 10 = LOAD_REGISTER 10 { param = TEXT param.data = file:current:uid } 20 = IMAGE 20 { file = GIFBUILDER file { # Format und Größe definieren XY = 139,139 format = png 10 = IMAGE 10 { align = c,c file { import.data = register:param treatIdAsReference = 1 width = 110m height = 110c } } } } } }
Now I added code to the new Template/MenuSubpages.html and change e.g. data.uid to page.data.uid correspondingly the the content-array. Normaly it should work as before, but I get an Exception: #1476107295: PHP Warning: imagecreatetruecolor(): Invalid image dimensions in /usr/www/users/fischhas/typo3/typo3_src-8.6.1/typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php line 2922
"import.data = register:param" returns no image object.
To get the image without GIFBUILDER and LOAD_REGISTER works fine:
lib.pageimage = FILES lib.pageimage { references { table = pages uid.dataWrap= {field: uid} fieldName = media } begin = 0 maxItems = 1 renderObj = IMAGE renderObj { file.width = 220m file.height = 220c file.import.data = file:current:uid file.crop.data = file:current:crop file.treatIdAsReference = 1 altText.data = file:current:alternative // file:current:title // file:current:description // file:current:source titleText.data = file:current:title } }
Do you know what happend? Is it a bug? Did anything changed?
Thank you for all the work.
Martin
Updated by Joe Jones over 7 years ago
äh, sorry, Fluid integration is
<f:cObject typoscriptObjectPath="lib.pageimagethumb" data="{uid:'{page.uid}'}" />
of course :-)
Updated by Benni Mack over 5 years ago
- Target version changed from next-patchlevel to Candidate for patchlevel
Updated by Benni Mack 5 months ago
- Status changed from New to Closed
I could not reproduce the issue anymore in v12.
I think the "current" parameter gets overridden too many times, so the "file:current:uid" does not apply properly at all.
I think you don't even need the register, but the second variant seems much better.
Let me know if the issue still exists in v12+