Bug #80175

imagecreatetruecolor(): Invalid image dimensions on Image import with LOAD_REGISTER in CE menu

Added by Joe Jones over 2 years ago. Updated 6 months ago.

Status:
New
Priority:
Must have
Assignee:
Category:
Fluid Styled Content
Start date:
2017-03-07
Due date:
% Done:

0%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

History

#1 Updated by Joe Jones over 2 years ago

äh, sorry, Fluid integration is

<f:cObject typoscriptObjectPath="lib.pageimagethumb" data="{uid:'{page.uid}'}"  /> 

of course :-)

#2 Updated by Benni Mack 6 months ago

  • Target version changed from next-patchlevel to Candidate for patchlevel

Also available in: Atom PDF