Project

General

Profile

Actions

Bug #23687

closed

Throws Exception "Class does not exist" in Front- and Backend using memcache and caching-framework

Added by Andy Weber over 13 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Category:
Caching
Target version:
-
Start date:
2010-10-07
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.4
PHP Version:
5.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Throws Exception when using TYPO3 > 4.4.2 with caching-framework and memchache.

Here are the localconfig settings:
$TYPO3_CONF_VARS['SYS']['useCachingFramework'] = '1';

$TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'] = array(
'cache_pages' => array(
'backend' => 't3lib_cache_backend_MemcachedBackend',
'options' => array(
'servers' => array('localhost:11211'),
),
),
'cache_pagesection' => array(
'backend' => 't3lib_cache_backend_MemcachedBackend',
'options' => array(
'servers' => array('localhost:11211'),
),
),
'cache_hash' => array(
'backend' => 't3lib_cache_backend_MemcachedBackend',
'options' => array(
'servers' => array('localhost:11211'),
),
),
);

With TYPO3 4.4.2 source everything works fine. Change source to 4.4.3 or 4.4.4 and the error appears.

Using Linux with
PHP Version: 5.3.x
Memcache Version: 2.2.5

Uncaught TYPO3 Exception
Class does not exist

ReflectionException thrown in file
/path/to/source/typo3_src-4.4.4/t3lib/class.t3lib_div.php in line 5250.

9 ReflectionClass::__construct(NULL)

/path/to/source/typo3_src-4.4.4/t3lib/class.t3lib_div.php:

05248: array_shift($constructorArguments);
05249:

05250: $reflectedClass = new ReflectionClass($className);

05251: $instance = $reflectedClass->newInstanceArgs($constructorArguments);
05252: } else {

8 t3lib_div::makeInstance(NULL, "cache_pages", t3lib_cache_backend_MemcachedBackend)

/path/to/source/typo3_src-4.4.4/t3lib/cache/class.t3lib_cache_factory.php:

00103: }
00104:

00105: $cache = t3lib_div::makeInstance($cacheClassReference, $cacheIdentifier, $backend);

00106:
00107:

7 t3lib_cache_Factory::create("cache_pages", NULL, "t3lib_cache_backend_MemcachedBackend", array)

/path/to/source/typo3_src-4.4.4/t3lib/class.t3lib_cache.php:

00065: $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['backend'],
00066: $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['options']

00067: );

00068: } catch(t3lib_cache_exception_DuplicateIdentifier $e) {
00069: // do nothing, a cache_pages cache already exists

6 t3lib_cache::initPageCache()

/path/to/source/typo3_src-4.4.4/typo3/sysext/cms/tslib/class.tslib_fe.php:

00618: );
00619: } catch(t3lib_cache_exception_NoSuchCache $e) {

00620: t3lib_cache::initPageCache();

00621:
00622: $this->pageCache = $GLOBALS['typo3CacheManager']->getCache(

5 tslib_fe::initCaches()

/path/to/source/typo3_src-4.4.4/typo3/sysext/cms/tslib/class.tslib_fe.php:

00464:
00465: if (TYPO3_UseCachingFramework) {

00466: $this->initCaches();

00467: }
00468: }

4 tslib_fe::tslib_fe(array, NULL, NULL, NULL, NULL, NULL, NULL, NULL)

3 ReflectionClass::newInstanceArgs(array)

/path/to/source/typo3_src-4.4.4/t3lib/class.t3lib_div.php:

05249:
05250: $reflectedClass = new ReflectionClass($className);

05251: $instance = $reflectedClass->newInstanceArgs($constructorArguments);

05252: } else {
05253: $instance = new $className;

2 t3lib_div::makeInstance("tslib_fe", array, NULL, NULL, NULL, NULL, NULL, NULL, NULL)

/path/to/source/typo3_src-4.4.4/typo3/sysext/cms/tslib/index_ts.php:

00211: t3lib_div::_GP('MP'),
00212: t3lib_div::_GP('RDCT')

00213: );

00214: /* @var $TSFE tslib_fe */
00215:

1 require("/path/to/source/typo3_src-4.4.4/typo3/sysext/cms/tslib/index_ts.php")

/var/www/vhosts/typo.ratgeber.immowelt.de/index.php:

00078: // **********
00079:

00080: require (PATH_tslib.'index_ts.php');

00081:
00082: ?>
(issue imported from #M15923)


Related issues 1 (0 open1 closed)

Is duplicate of TYPO3 Core - Bug #23694: [Caching framework] Improve error message if no frontend was defined for core cachesClosedChristian Kuhn2010-10-08

Actions
Actions #1

Updated by Andy Weber over 13 years ago

SOLVED

Since 4.4.3 you need also to configure also the following paramter in the localconf:

'frontend'=> 't3lib_cache_frontend_VariableFrontend',

So you need to change the localconf setting to:

$TYPO3_CONF_VARS['SYS']['useCachingFramework'] = '1';
$TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations'] = array(
'cache_pages' => array(
'frontend'=> 't3lib_cache_frontend_VariableFrontend',
'backend' => 't3lib_cache_backend_MemcachedBackend',
'options' => array(
'servers' => array('localhost:11211'),
),
),
'cache_pagesection' => array(
'frontend' => 't3lib_cache_frontend_VariableFrontend',
'backend' => 't3lib_cache_backend_MemcachedBackend',
'options' => array(
'servers' => array('localhost:11211'),
),
),
'cache_hash' => array(
'frontend'=> 't3lib_cache_frontend_VariableFrontend',
'backend' => 't3lib_cache_backend_MemcachedBackend',
'options' => array(
'servers' => array('localhost:11211'),
),
),
);

And now it works again. I'll hope that will find the way into some documentation about the caching framework in TYPO3 4.5.

Actions #2

Updated by Steffen Kamper over 13 years ago

add following to all of your cache configs:
'frontend' => 't3lib_cache_frontend_VariableFrontend'

it was hardcoded before but then removed.
Documentation for cache framework is in the queue.

Actions #3

Updated by Felix Buenemann over 13 years ago

Duplicate of bug id 0015866

Actions #4

Updated by Christian Kuhn over 13 years ago

Resolved as duplicate of #23694

The misleading configuration example was removed with #23694

Actions #5

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF