Bug #44017
closedtypo3/thumbs.php causes invalid autoloader cache
0%
Description
This bug is a little bit tricky, because it involves caching. Therefore the error shows up at other places, than where it's originated.
Symptom¶
Right part of the backend stays white. PHP-Error
PHP Fatal error: require(): Failed opening required 'PATH_tslibclass.tslib_content.php' in /var/www/typo3_src/4.7.0/t3lib/class.t3lib_div.php on line 5061After some minutes / hours the backend is usable again.
Backtrace
t3lib_div::requireFile() at /var/www/typo3_src/4.7.0/t3lib/class.t3lib_div.php : 5061 t3lib_autoloader::autoload() at /var/www/typo3_src/4.7.0/t3lib/class.t3lib_autoloader.php : 97 t3lib_autoloader::autoload() spl_autoload_call() ReflectionParameter::getConstructorArguments() at /var/www/typo3_src/4.7.0/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php : 73 Tx_Extbase_Object_Container_ClassInfoFactory::buildClassInfoFromClassName() at /var/www/typo3_src/4.7.0/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php : 47 Tx_Extbase_Object_Container_ClassInfoFactory::getClassInfo() at /var/www/typo3_src/4.7.0/typo3/sysext/extbase/Classes/Object/Container/Container.php : 344 Tx_Extbase_Object_Container_Container::getInstanceInternal() at /var/www/typo3_src/4.7.0/typo3/sysext/extbase/Classes/Object/Container/Container.php : 159 Tx_Extbase_Object_Container_Container::getInstance() at /var/www/typo3_src/4.7.0/typo3/sysext/extbase/Classes/Object/Container/Container.php : 120 Tx_Extbase_Object_Container_Container::get() at /var/www/typo3_src/4.7.0/typo3/sysext/extbase/Classes/Object/ObjectManager.php : 74 Tx_Extbase_Object_ObjectManager::__construct() at /var/www/vhosts/entb2012.ch/typo3conf/ext/flux/Classes/Backend/Preview.php : 76 Tx_Flux_Backend_Preview::makeInstance() at /var/www/typo3_src/4.7.0/t3lib/class.t3lib_div.php : 4847 t3lib_div::getUserObj() at /var/www/typo3_src/4.7.0/t3lib/class.t3lib_div.php : 4736 tx_cms_layout::tt_content_drawItem() at /var/www/typo3_src/4.7.0/typo3/sysext/cms/layout/class.tx_cms_layout.php : 1729 tx_cms_layout::getTable_tt_content() at /var/www/typo3_src/4.7.0/typo3/sysext/cms/layout/class.tx_cms_layout.php : 418 tx_cms_layout::getTable() at /var/www/typo3_src/4.7.0/typo3/sysext/cms/layout/class.tx_cms_layout.php : 118 tx_cms_layout::generateList() at /var/www/typo3_src/4.7.0/typo3/class.db_list.inc : 288 tx_cms_layout::renderListContent() at /var/www/typo3_src/4.7.0/typo3/sysext/cms/layout/db_layout.php : 1067 SC_db_layout::main() at /var/www/typo3_src/4.7.0/typo3/sysext/cms/layout/db_layout.php : 503 main() at /var/www/typo3_src/4.7.0/typo3/sysext/cms/layout/db_layout.php : 1361
Problem description¶
- Autoloader caches a map for classnames to filenames in
typo3temp/Cache/Code/cache_phpcode/..
. Content:<?php return array( ... 'tslib_adminpanel' => 'PATH_tslibclass.tslib_adminpanel.php', 'tslib_cobj' => 'PATH_tslibclass.tslib_content.php', 'tslib_frameset' => 'PATH_tslibclass.tslib_frameset.php', 'tslib_tableoffset' => 'PATH_tslibclass.tslib_tableoffset.php', 'tslib_controltable' => 'PATH_tslibclass.tslib_controltable.php', 'tslib_eidtools' => 'PATH_tslibclass.tslib_eidtools.php', 'tslib_fe' => 'PATH_tslibclass.tslib_fe.php', 'tslib_fecompression' => 'PATH_tslibclass.tslib_fecompression.php', 'tslib_fetce' => 'PATH_tslibclass.tslib_fetce.php', ...
- If the cache_phpcode is empty and
typo3/thumbs.php
is executed, a map with invalid filenames is generated, because PATH_tslib isn't defined and PHP uses the constant name as a value
Reproduce¶
- get the src url of a thumbnail in backend. e.g. typo3/thumbs.php?&file=%2Fvar%2Fwww%2Fvhosts%2Fmysite.ch%2Ffileadmin%2Ffiles%2Fpicture.png&size=56x42&md5sum=fbd1618afd&dummy=3543138413
- Clear cache_phpcode
rm typo3temp/Cache/Code/cache_phpcode/*
- open url from 1.
- atuoloader cache file is generated in typo3temp/Cache/Code/cache_phpcode/ containing
PATH_tslib
as a string an backend doesn't work any more until cache is cleared.
Updated by Jonas Renggli almost 12 years ago
- Problem still exists in TYPO3 4.7.7
- Problem doesn't exist in TYPO3 6.0 because "Bootstrap: Central constants and path handling" were introduced in http://forge.typo3.org/projects/typo3v4-core/repository/revisions/bf119ecd4e408cabace9791b3216e08001664f5d and all constants are defined by calling
require('init.php');
Updated by Jonas Renggli almost 12 years ago
Solution would be to backport http://forge.typo3.org/projects/typo3v4-core/repository/revisions/bf119ecd4e408cabace9791b3216e08001664f5d/diff/typo3/thumbs.php to TYPO3 4.7 branch
Updated by Tobias Liebig almost 12 years ago
- Category set to Backend API
- Complexity set to medium
Updated by Jigal van Hemert almost 12 years ago
- Status changed from New to Accepted
Updated by Gerrit Code Review over 11 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/20731
Updated by Steve Schütze over 11 years ago
I also get these problem and the patch helps. Why it was not push to trunk?
Gerrit Code Review wrote:
Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/20731
Updated by Georg Ringer over 11 years ago
this has been solved in current master = 6.2
Updated by Steve Schütze over 11 years ago
but not to master 4.7.12 ??
Georg Ringer wrote:
this has been solved in current master = 6.2
Updated by Gerrit Code Review over 11 years ago
Patch set 2 for branch TYPO3_4-7 has been pushed to the review server.
It is available at https://review.typo3.org/20731
Updated by Michael Stucki over 11 years ago
This still needs to be fixed in both 4.5 and 4.7. It does not occur in 6.0 and later as far as I'm informed.
I pushed a new patch for 4.7. Once that it is merged, I'll take care of the 4.5 backport.
Updated by Stefan Neufeind over 11 years ago
In 4.5 the problem only "happens" while thumbs.php is running. So actually you'd need to trigger it through needing some autoload in thumbs.php (through a hook or xclass). When that call is finished, it's through. We don't have a cache_phpcode in 4.5.
In 4.7 as described the issue may destroy your autoload-cache and may lead to strange problems in (at first sight) unrelated other parts of TYPO3 CMS.
Updated by Stefan Neufeind almost 11 years ago
- Status changed from Under Review to Closed
- Is Regression set to No
Won't resolve this in 4.5/4.7. Higher versions are already fixed.
Updated by Michael Stucki almost 11 years ago
- Status changed from Closed to Under Review
Reopening after discussion with Stefan. This is still a blocker in TYPO3 4.7.
Updated by Wouter Wolters almost 10 years ago
- Status changed from Under Review to Closed
4.7 is EOL by now.