Project

General

Profile

Actions

Bug #21543

closed

t3lib_cache_exception_NoSuchCache exception is not thrown

Added by Anonymous about 15 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Caching
Target version:
-
Start date:
2009-11-13
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.3
PHP Version:
5.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When trying to create a cach that does not exist with the following code, and the caching framework disabled in typo3 by setting useCachingFramework to zero:

if (!($GLOBALS['typo3CacheManager'] instanceof t3lib_cache_Manager)) {
$GLOBALS['typo3CacheManager'] = t3lib_div::makeInstance('t3lib_cache_Manager');
}
$pageCache = $GLOBALS['typo3CacheManager']->getCache('cache_pages');

It is expected that the t3lib_cache_exception_NoSuchCache exception is thrown, on error, but currently TYPO3 crashes with the following error message:
Fatal error: Call to a member function create() on a non-object in TYPO3_4_3/t3lib/class.t3lib_cache.php on line 62

I am using the trunk version, checked out a few minutes ago: Revision 6409
(issue imported from #M12579)

Actions #1

Updated by Oliver Hader about 15 years ago

It's written in NEWS.txt:
If you use the caching framework it is not possible anymore to query the cache tables directly.
Any extension that needs the new caching framework has to make sure that it is initialized by
calling t3lib_cache::initializeCachingFramework().

Thus, call t3lib_cache::initializeCachingFramework() from your extensions before you want to use and access the caching framework and everything should be fine again.

Actions #2

Updated by Anonymous about 15 years ago

But doesn't this activate the caching framework for the whole TYPO3 installation?

Actions #3

Updated by Anonymous about 15 years ago

This bug can be closed as invalid, since it was caused by our wrong usage of the caching framework.

Actions #4

Updated by Oliver Hader about 15 years ago

Thanks for your feedback. This bug will be closed...

Actions #5

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF