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