Bug #31953

Thumbnails (Backend) are not displayed

Added by Gunther Schöbinger over 2 years ago. Updated 3 months ago.

Status:Resolved Start date:2011-11-20
Priority:Should have Due date:
Assignee:Francois Suter % Done:

100%

Category:Image Generation Spent time: -
Target version:4.5.23
TYPO3 Version:4.7 Complexity:
PHP Version:5.3 Is Regression:
Votes: 2 (View)

Description

The generating of thumbnails in the backend fails, if there are any PHP-Warnings on the server.

Have a look in the file typo3/thumbs.php - the output is a image-file and if there any warnings of PHP the processing of the image fails.

I would suggest to disable the error_reporting in this case (in this file), because no user see the output of the error_reporting anyway.


Related issues

related to Core - Bug #48838: Thumbnails (Backend) are not displayed New 2013-06-04

Associated revisions

Revision 51774f94
Added by Francois Suter about 1 year ago

[BUGIFX] Extra output block backend thumbnails

If some inclusion causes output when viewing image thumbnails
in the backend, the output will be broken. Adding a call to
ob_clean() ensures that this does not happen.

Resolves: #31953
Releases: 6.1, 6.0
Change-Id: I1d33bc3c5e8bbd1851f087c76564f8924f8dfe26
Reviewed-on: https://review.typo3.org/18220
Reviewed-by: Stefan Neufeind
Reviewed-by: Wouter Wolters
Reviewed-by: Mattias Nilsson
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer

Revision 6f4b778a
Added by Francois Suter about 1 year ago

[BUGIFX] Extra output block backend thumbnails

If some inclusion causes output when viewing image thumbnails
in the backend, the output will be broken. Adding a call to
ob_clean() ensures that this does not happen.

Resolves: #31953
Releases: 6.1, 6.0
Change-Id: I1d33bc3c5e8bbd1851f087c76564f8924f8dfe26
Reviewed-on: https://review.typo3.org/18959
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn

Revision 7a0f5384
Added by Francois Suter about 1 year ago

[BUGIFX] Extra output blocks backend thumbnails

If some inclusion causes output when viewing image thumbnails
in the backend, the output will be broken. Adding a call to
ob_clean() ensures that this does not happen.

Resolves: #31953
Releases: 4.5, 4.7
Change-Id: I8fe3363bde1b63f7ae950397dd42e7b426a754b6
Reviewed-on: https://review.typo3.org/19004
Reviewed-by: Francois Suter
Tested-by: Francois Suter

Revision 7717b856
Added by Francois Suter about 1 year ago

[BUGIFX] Extra output blocks backend thumbnails

If some inclusion causes output when viewing image thumbnails
in the backend, the output will be broken. Adding a call to
ob_clean() ensures that this does not happen.

Resolves: #31953
Releases: 4.5, 4.7
Reviewed-on: https://review.typo3.org/19004
Reviewed-by: Francois Suter
Tested-by: Francois Suter
Change-Id: Ic540939d2a39b0adeb4427a6e772ad506686378d
Reviewed-on: https://review.typo3.org/19005

History

Updated by Julian Hofmann over 2 years ago

Disabling error_reporting would not fully solve this problem.
You'll also get no image displayed, if in any included file whitespaces are before/after the -tags.

Updated by Gunther Schöbinger over 2 years ago

You are right, but in which cases would whitespaces be included?
The main problem is the use of error_reporting in a way that no error-message would ever appear. I would suggest:

- disabling the error_reporting

or alternatively

- inform the user about the problem

Thanks Gunther

Updated by Julian Hofmann over 2 years ago

You are right, but in which cases would whitespaces be included?

For example by some extensions which does not comply the CGL. Currently we had this effect with EXT:multishop. Whitespace could also be included by faulty realurl configurations - or by any other automatically included files from outside the TYPO3 Core.

Updated by Benjamin over 1 year ago

i fixed it in my installation with:

t3lib/thumbs.php:
Line 41: ob_start();
Line 404: ob_end_clean();

Maybe we can get the output-buffer and if there ist any whitespace includen, then write to some error log / error message?

Updated by Francois Suter about 1 year ago

  • Status changed from New to Accepted
  • Assignee set to Francois Suter
  • Target version set to 4.5.23
  • TYPO3 Version changed from 4.6 to 4.7

I stumbled on the same issue up to version 4.7, but not on 6.0.

It seems related to some server settings, because the problem does not happen across all servers. However it seems safe to me to add a call to ob_clean() before the actual output, as this script is not supposed to be returning anything else than the image.

Updated by Gerrit Code Review about 1 year ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/18220

Updated by Francois Suter about 1 year ago

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

Updated by bokonet no-lastname-given 11 months ago

After updating TYPO3 CMS 4.5.25 to 4.5.27, the generating of thumbnails in the backend stopped working. The error is reproducible on 3 different servers (CentOS 6.4, PHP 5.3.3).

By opening http://domain.tld/typo3/thumbs.php?&dummy=1369910747&file=%2Fsrv%2Fwww%2Fvhosts%2Fdomain.tld%2Fhtdocs%2Ffileadmin%2FTest%2F200.jpg&md5sum=69ec2fa10f the following error messages occured:

in Chrome: Fehler 330 (net::ERR_CONTENT_DECODING_FAILED): Unbekannter Fehler.
in Firefox: Content-Encoding-Fehler. Die Webseite, die Sie öffnen möchten, kann nicht angezeigt werden, da sie eine ungültige oder unbekannte Form der Kompression verwendet.

The error does not occur when you remove "ob_clean();" from line 206 in t3lib/thumbs.php or when you add a ob_start() somewhere before that line.

Updated by Francois Suter 11 months ago

Hmm, this is weird. I tested it on a variety of servers myself. This seems to be dependent on some server configuration, but I don't know which. Already for us it solved a bug that appeared only on some servers.

Anyway you should open a separate issue and related it to this one, to give it the proper visibility.

Also available in: Atom PDF