Bug #19507
closed
getCompressedTCarray hangs if no cache_hash exists
Added by Franz Holzinger over 15 years ago.
Updated almost 14 years ago.
Description
When you call
$TSFE->getCompressedTCarray();
in a FE extension, e.g. after an Ajax call with eID parameter, then this ends up in an error message.
t3lib_cache_exception_NoSuchCache: A cache with identifier "cache_hash" does not exist. in /var/www/html/trunk/t3lib/cache/class.t3lib_cache_manager.php on line 77
It should continue instead, if no cache_hash has been found.
(issue imported from #M9648)
Files
Have you tried using install tool to check/update databases? It appears that your cache_hash has old format and therefore it is failing.
This happens under the most current 4.3-dev.
The DB 'Update required tables COMPARE' has been done successfully.
This was described in the mailing lists. Current database analyzer cannot change cache table as necessary but there is a separate bug report and RFC about it. cache_hash must exist on the system, just like pages or tt_content. It is required. If it does not exist, the system will not work and it is not a bug.
The best thing that you can do right now is to drop this table and let Install tool recreate it later.
This bug report can be closed.
This specific issue is not related to the database changes. When calling an eid script the cache handlers/managers are not yet registered and thus the cache is not found.
I attached a patch that does the following:
- move initialization of caches to t3lib_cache::initialize()
- add new method to eidtools to initialize all caches (cache_pages, cache_hash, cache_pagesection)
@Franz Koch: Please test this patch and before calling "$TSFE->getCompressedTCarray()", please make sure that "tslib_eidtools::initCaches()" was called
I think it will be better if cache initialization is moved to TSFE. Currently many existing extensions are borken when they try to instantiate TSFE. 4.3 is not compatible in this way.
Seems like this is related to our mysql-server crashing with this error message:
InnoDB: Unable to assign a new identifier to table `kk3s/cache_pages`.
@Oliver:
I have added these lines at the beginning of my eid script. And this fixes the problem.
-------------
$typoVersion = t3lib_div::int_from_ver($GLOBALS['TYPO_VERSION']);
if ($typoVersion >= 4003000) {
require_once(PATH_tslib.'class.tslib_eidtools.php');
// ***************************
// Initializing the Caching System
// ***************************
$TT->push('Initializing the Caching System','');
tslib_eidtools::initCaches();
$TT->pull();
}
Also available in: Atom
PDF