Fixed Fatal error: Doctrine\Common\Cache\VoidCache ont found in ...../src/XF/CacheFactory.php

Wildcat Media

Well-known member
Affected version
2.3 RC2 (upgrading from 2.2.15)
I was attempting an upgrade from 2.2.15 to 2.3 RC2 just now and got the following error early on in the process:

Code:
Fatal error: Uncaught Error: Class "Doctrine\Common\Cache\VoidCache" not found in /usr/www/users/xxxx/yyyyy/src/XF/CacheFactory.php:251 Stack trace: #0 /usr/www/users/xxxx/yyyyy/src/XF/CacheFactory.php(81): XF\CacheFactory->createVoidCache(Array) #1 /usr/www/users/xxxx/yyyyy/src/XF/CacheFactory.php(36): XF\CacheFactory->instantiate('Void', Array) #2 /usr/www/users/xxxx/yyyyy/src/XF/App.php(709): XF\CacheFactory->create('Void', Array) #3 /usr/www/users/xxxx/yyyyy/src/XF/Container.php(234): XF\App->XF\{closure}('', Array, Object(XF\Container)) #4 /usr/www/users/xxxx/yyyyy/src/XF/App.php(2661): XF\Container->create('cache', '') #5 /usr/www/users/xxxx/yyyyy/src/XF/App.php(736): XF\App->cache('registry') #6 /usr/www/users/xxxx/yyyyy/src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container)) #7 /usr/www/users/xxxx/yyyyy/src/XF/App.php(1931): XF\Container->offsetGet('registry') #8 /usr/www/users/xxxx/yyyyy/src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container)) #9 /usr/www/users/xxxx/yyyyy/src/XF/App.php(1597): XF\Container->offsetGet('extension.liste...') #10 /usr/www/users/xxxx/yyyyy/src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container)) #11 /usr/www/users/xxxx/yyyyy/src/XF/App.php(2980): XF\Container->offsetGet('extension') #12 /usr/www/users/xxxx/yyyyy/src/XF/App.php(3011): XF\App->extension() #13 /usr/www/users/xxxx/yyyyy/src/XF/App.php(1117): XF\App->extendClass('XF\\FsMounts') #14 /usr/www/users/xxxx/yyyyy/src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container)) #15 /usr/www/users/xxxx/yyyyy/src/XF/App.php(2736): XF\Container->offsetGet('fs') #16 /usr/www/users/xxxx/yyyyy/src/XF.php(944): XF\App->fs() #17 /usr/www/users/xxxx/yyyyy/src/XF/Util/File.php(770): XF::fs() #18 /usr/www/users/xxxx/yyyyy/src/XF/Error.php(102): XF\Util\File::installLockExists() #19 /usr/www/users/xxxx/yyyyy/src/XF/App.php(2498): XF\Error->logException(Object(Error), true, '') #20 /usr/www/users/xxxx/yyyyy/src/XF.php(202): XF\App->logException(Object(Error), true) #21 [internal function]: XF::handleException(Object(Error)) #22 {main} thrown in /usr/www/users/xxxx/yyyyy/src/XF/CacheFactory.php on line 251

I was able to get around it by disabling the cache in config.php.
 
Can you provide your cache configuration (from config.php)? I think this is liable to happen in some circumstances regardless of the cache provider, but having the Void provider is a little odd as it's essentially a fake cache.

Also, was this using the one-click upgrader from a working 2.2 installation, or how was it performed?
 
Can you provide your cache configuration (from config.php)? I think this is liable to happen in some circumstances regardless of the cache provider, but having the Void provider is a little odd as it's essentially a fake cache.

I redacted anything identifinable.

1717764696309.webp

Also, was this using the one-click upgrader from a working 2.2 installation, or how was it performed?

It was a one-click upgrade from a working 2.2.15 installation.
 
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.3.0 Release Candidate 3).

Change log:
Attempt to address some issues when upgrading from XF 2.2 with caching enabled
There may be a delay before changes are rolled out to the XenForo Community.
 
I think this should be OK in RC 3 either way, but I did want to note your cache configuration is from XF 1.x and no longer works as configured (even in XF 2.2). You can see here for how to update the configuration:

That makes sense--I'll check that out. (It's been on our test server for a long time.) Thanks for the assist!
 
So I just encountered this error when doing my one-click upgrade too. I ended up commenting out the cache options in my config.php, upgrading, then re-enabling the cache options, and all is working fine.
 
Oh, wait, nevermind. Mine was actually not the VoidCache. Mine was this:

Code:
[06-Jul-2024 21:40:07 UTC] PHP Fatal error:  Uncaught Error: Class "Doctrine\Common\Cache\FilesystemCache" not found in
 
Back
Top Bottom