Project

General

Profile

Actions

Bug #62184

closed

Exception using GIFBUILDER in css_styled_content texpic renderer

Added by René Pflamm about 10 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
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:

  1. Greate an image content element with one or more images
  2. Assign at least one image an link
  3. 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;

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #65378: Scaling/cropping images in GIFBUILDER does not workClosed2015-02-27

Actions
Actions

Also available in: Atom PDF