Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The "Clear all caches" function shows this error:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'drupal7.cache_block' doesn't exist: TRUNCATE {cache_block} ; Array ( ) in cache_clear_all() (line 170 of drupal-7.x-dev/includes/cache.inc).
removing the mongodb_block_flush_caches() function fixes the problem, but I am not sure if that is the correct solution..
Comment | File | Size | Author |
---|---|---|---|
#2 | missing_cache_block_table-859240-2.patch | 485 bytes | jyee |
Comments
Comment #1
chx CreditAttribution: chx commentedUse mongodb_cache or memcached or anything that's not so boneheaded to require a table create. Or just enable block once.
Comment #2
jyee CreditAttribution: jyee commentedEnabling core block to generate the cache_block table is fine, as long as you don't perform a module uninstall after disabling it.
Using mongodb_cache is fine as a solution, but it means that mongodb_block should actually test that mongodb_cache is enabled before returning instructions to hook_flush_caches.
Comment #3
fgmChecking that the module exists is not sufficient: the availability of the MongoDB-based cache bins depends on the cache class for the selected bin, which is defined in settings: even with the module enabled and the cache plugin loaded, the block cache bin might still be set to the DB or something else.