Project

General

Profile

Actions

Bug #44017

closed

typo3/thumbs.php causes invalid autoloader cache

Added by Jonas Renggli over 11 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Backend API
Target version:
-
Start date:
2012-12-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.7
PHP Version:
Tags:
Complexity:
medium
Is Regression:
No
Sprint Focus:

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 5061
After 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

  1. 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
  2. Clear cache_phpcode
    rm typo3temp/Cache/Code/cache_phpcode/*
    
  3. open url from 1.
  4. 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.

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #23285: PATH_site not defined in typo3/thumbs.phpClosed2010-07-28

Actions
Actions #1

Updated by Jonas Renggli over 11 years ago

Actions #3

Updated by Tobias Liebig over 11 years ago

  • Category set to Backend API
  • Complexity set to medium
Actions #4

Updated by Jigal van Hemert over 11 years ago

  • Status changed from New to Accepted
Actions #5

Updated by Gerrit Code Review almost 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

Actions #6

Updated by Steve Schütze almost 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

Actions #7

Updated by Georg Ringer almost 11 years ago

this has been solved in current master = 6.2

Actions #8

Updated by Steve Schütze almost 11 years ago

but not to master 4.7.12 ??

Georg Ringer wrote:

this has been solved in current master = 6.2

Actions #9

Updated by Gerrit Code Review over 10 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

Actions #10

Updated by Michael Stucki over 10 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.

Actions #11

Updated by Stefan Neufeind over 10 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.

Actions #12

Updated by Stefan Neufeind over 10 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.

Actions #13

Updated by Michael Stucki over 10 years ago

  • Status changed from Closed to Under Review

Reopening after discussion with Stefan. This is still a blocker in TYPO3 4.7.

Actions #14

Updated by Wouter Wolters over 9 years ago

  • Status changed from Under Review to Closed

4.7 is EOL by now.

Actions

Also available in: Atom PDF