Bug #59528

Epic #65815: Improve Indexed search indexer

SQL-Error: Column 'height' cannot be null

Added by rengaw83 about 7 years ago. Updated almost 3 years ago.

Must have
File Abstraction Layer (FAL)
Target version:
Start date:
Due date:
% Done:


Estimated time:
TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


At the TYPO3\CMS\Core\Resource\Service\IndexerService::indexFile method the file size is determined by getimagesize:

list($fileInfo['width'], $fileInfo['height']) = getimagesize($rawFileLocation);

On failure, FALSE is returned.
@see http://mx2.php.net/manual/en/function.getimagesize.php

If ann error occours, fileInfo['width'] and $fileInfo['height'] will be NULL and the following MySQL error happens:

Column 'height' cannot be null

INSERT INTO sys_file

This error occurs, for example when rendering an image in the FE and a crop-scale is executed. So the image has to be indexed.

It can be fixed with the following code(see the diff):

if (is_array($imageSize = getimagesize($rawFileLocation))) {
    $fileInfo['width'] = $imageSize[0];
    $fileInfo['height'] = $imageSize[1];

btw: sorry for my englisch.


getimagesize.diff (928 Bytes) getimagesize.diff rengaw83, 2014-06-12 15:40

Updated by Florian Schaeffer almost 7 years ago

Confimed on 6.1.9 and 6.1.10

Your solution solved my problem, I could successfully perform an index job after applying your diff.


Updated by Tymoteusz Motylewski over 6 years ago

  • Description updated (diff)
  • Parent task set to #65815

Updated by Stefan Neufeind almost 6 years ago

  • TYPO3 Version changed from 6.1 to 6.2

Only applies to 6.2 now. In master (7) this is taken care of in the ImageInfo-class.


Updated by Gerrit Code Review almost 6 years ago

  • Status changed from New to Under Review

Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/42649


Updated by Stefan Neufeind almost 6 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Updated by Benni Mack almost 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF