I cannot see thumbnails for images in the backend anymore. Why?

微笑、不失礼 提交于 2019-12-12 16:27:32

问题


If I go to Filelist in the Typo3 backend and check the option to display thumbnails, I only see broken image links.

Yet I remember that the thumbnails displayed ok at some point.

A test of ImageMagick in the install tool of typo shows, that ImageMagick is working ok.

What to do?


回答1:


It's not only RealURL's problem - although it's most common while users are manipulating this file manually to add custom rules. Anyway this problem also ocures with typo3conf/localconf.php.

How to confirm:

Right click on the broken image and choose Open image in new window it will open a file with address like: http://somedomain.tld/typo3/thumbs.php?&file=..%2Fuploads%2...etc use some browser to preview the source code ie. in Chrome prepend the address with view-source: like: view-source:http://somedomain.tld/typo3/thumbs.php?&file=...etc. There should not be any whitespaces before the code of image...

How to prevent?

As you wrote. Check your config files like realurl_conf.php or localconf.php and make sure that there are no spaces before <?php. In case of script ending.... just remove the ?> tag, so script will end automatically without white spaces (even if you'll add 100 empty lines after last line of code), unfortunately sometimes finding this one annoying space in configs takes hours, so....

How to fix permanently?

I'm surprised, that isn't fixed after all these years still, while it's quite easy with ob_end_clean(), edit file: t3lib/thumbs.php, at the beginning (ie. right after php tag) add line:

<?php
ob_start();

Next find main() method, add at its begining line for cleaning output buffer, which will remove all garbage included from other files:

function main() {
    ob_end_clean(); //here
    ...

Voila!




回答2:


After Plesk update on one of servers by client's sysadmin we get an empty file /tmp/.tmp.err which was autoprepended with auto_prepend_file in php configuration.

So, all TYPO3 PHP scripts were prepended with an empty string. All dynamic thumbnails and dynamically generated XMLs were broken. Some unique situation, but probably could help to somebody.




回答3:


In our case an old version of the extension 'spamshield' cause the same error. We had Typo3 4.7.15 and 'spamshield' 1.0.2. Please check server error logs for entries like:

PHP Warning: require_once(PATH_tslibclass.tslib_pibase.php): failed to open stream: No such file or directory in /typo3conf/ext/wt_spamshield/Classes/Extensions/class.tx_wtspamshield_extensions_abstract.php on line 25, referer: http://domain.tld/typo3/sysext/cms/layout/db_layout.php?id=16 [Tue Sep 17 09:46:13 2013] [error] [client 92.203.10.178] PHP Fatal error: require_once(): Failed opening required 'PATH_tslibclass.tslib_pibase.php' (include_path='/typo3/contrib/pear/:.:/usr/local/php-5.3/lib/php') in /typo3conf/ext/wt_spamshield/Classes/Extensions/class.tx_wtspamshield_extensions_abstract.php on line 25, referer: http://domain.tld/typo3/sysext/cms/layout/db_layout.php?id=16

Updating 'spamshield' to 1.1.0 fixed it.




回答4:


There is a good chance that you may have the extension

rearUrl

installed.

Please check the realUrl config.

Typically this is located in

typoroot/typo3conf/

and is named realurlconf.php, realurl_conf.php or realurl_autoconf.php

Make sure there is no comment or whitespace lines before the <?php tag, as well as none after the closing php tag at the end.

Clear typo caches, then it works again.



来源:https://stackoverflow.com/questions/15519811/i-cannot-see-thumbnails-for-images-in-the-backend-anymore-why

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!