Fixed Class "Doctrine\Common\Cache\MemcachedCache" not found

rkxh

New member
Affected version
2.3
Code:
PHP Fatal error:  Uncaught Error: Class "Doctrine\Common\Cache\MemcachedCache" not found in /home/saabforum/src/XF/Cache/MemcachedCache.php:9
Stack trace:
#0 /home/saabforum/src/vendor/composer/ClassLoader.php(576): include()
#1 /home/saabforum/src/vendor/composer/ClassLoader.php(427): Composer\Autoload\{closure}('...')
#2 /home/saabforum/src/XF/CacheFactory.php(197): Composer\Autoload\ClassLoader->loadClass('...')
#3 /home/saabforum/src/XF/CacheFactory.php(81): XF\CacheFactory->createMemcachedCache(Array)
#4 /home/saabforum/src/XF/CacheFactory.php(36): XF\CacheFactory->instantiate('...', Array)
#5 /home/saabforum/src/XF/App.php(707): XF\CacheFactory->create('...', Array)
#6 /home/saabforum/src/XF/Container.php(234): XF\App->XF\{closure}('', Array, Object(XF\Container))
#7 /home/saabforum/src/XF/App.php(2659): XF\Container->create('...', '')
#8 /home/saabforum/src/XF/App.php(734): XF\App->cache('...')
#9 /home/saabforum/src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container))
#10 /home/saabforum/src/XF/Install/App.php(73): XF\Container->offsetGet('...')
#11 /home/saabforum/src/XF/Container.php(31): XF\Install\App->XF\Install\{closure}(Object(XF\Container))
#12 /home/saabforum/src/XF/App.php(2702): XF\Container->offsetGet('...')
#13 /home/saabforum/src/XF.php(838): XF\App->options()
#14 /home/saabforum/src/XF/Entity/User.php(2431): XF::options()
#15 /home/saabforum/src/XF/Mvc/Entity/Manager.php(72): XF\Entity\User::getStructure(Object(XF\Mvc\Entity\Structure))
#16 /home/saabforum/src/XF/Repository/User.php(86): XF\Mvc\Entity\Manager->getEntityStructure('...')
#17 /home/saabforum/src/XF/Repository/User.php(32): XF\Repository\User->getGuestUser()
#18 /home/saabforum/src/XF.php(586): XF\Repository\User->getVisitor(0)
#19 /home/saabforum/src/XF/Error.php(137): XF::visitor()
#20 /home/saabforum/src/XF/App.php(2496): XF\Error->logException(Object(ErrorException), true, '')
#21 /home/saabforum/src/XF.php(240): XF\App->logException(Object(ErrorException), true)
#22 [internal function]: XF::handleFatalError()
#23 {main}
  thrown in /home/saabforum/src/XF/Cache/MemcachedCache.php on line 9

This occured during an upgrade via Admin CP. Manual file upload seems to solve it.
 
Same problem with Redis
Code:
[php:error]PHP Fatal error:  Uncaught Error: Class "Doctrine\\Common\\Cache\\RedisCache" not found in /var/www/myweb/src/XF/Cache/RedisCache.php:14 
Stack trace:
#0 /var/www/myweb/src/vendor/composer/ClassLoader.php(576): include()
#1 /var/www/myweb/src/vendor/composer/ClassLoader.php(427): Composer\\Autoload\\{closure}('...')
#2 /var/www/myweb/src/XF/CacheFactory.php(244): Composer\\Autoload\\ClassLoader->loadClass('...')
#3 /var/www/myweb/src/XF/CacheFactory.php(81): XF\\CacheFactory->createRedisCache(Array)
#4 /var/www/myweb/src/XF/CacheFactory.php(36): XF\\CacheFactory->instantiate('...', Array)
#5 /var/www/myweb/src/XF/App.php(707): XF\\CacheFactory->create('...', Array)
#6 /var/www/myweb/src/XF/Container.php(234): XF\\App->XF\\{closure}('', Array, Object(XF\\Container)
#7 /var/www/myweb/src/XF/App.php(2659): XF\\Container->create('...', '')
#8 /var/www/myweb/src/XF/App.php(734): XF\\App->cache('...')
#9 /var/www/myweb/src/XF/Container.php(31): XF\\App->XF\\{closure}(Object(XF\\Container))
#10 /var/www/myweb/src/XF/Install/App.php(73): XF\\Container->offsetGet('...')
#11 /var/www/myweb/src/XF/Container.php(31): XF\\Install\\App->XF\\Install\\{closure}(Object(XF\\Container))
#12 /var/www/myweb/src/XF/App.php(2702): XF\\Container->offsetGet('...')
#13 /var/www/myweb/src/XF.php(838): XF\\App->options()
#14 /var/www/myweb/src/XF/Entity/User.php(2431): XF::options()
#15 /var/www/myweb/src/XF/Mvc/Entity/Manager.php(72): XF\\Entity\\User::getStructure(Object(XF\\Mvc\\Entity\\Structure))
#16 /var/www/myweb/src/XF/Repository/User.php(86): XF\\Mvc\\Entity\\Manager->getEntityStructure('...')
#17 /var/www/myweb/src/XF/Repository/User.php(32): XF\\Repository\\User->getGuestUser()
#18 /var/www/myweb/src/XF.php(586): XF\\Repository\\User->getVisitor(0)
#19 /var/www/myweb/src/XF/Error.php(137): XF::visitor()
#20 /var/www/myweb/src/XF/App.php(2496): XF\\Error->logException(Object(Error), true, '')
#21 /var/www/myweb/src/XF.php(202): XF\\App->logException(Object(Error), true)
#22 [internal function]: XF::handleException(Object(Error))
#23 {main}
 thrown in /var/www/myweb/src/XF/Cache/RedisCache.php on line 14, referer: https://myweb/install/oc-upgrader.php

Help only disable Redis at config > Make Update > Enable again.
 
Last edited:
There have unfortunately been several cache related issues with one-click upgrades, which all have the same underlying cause. We typically track regressions (or bad fix) issues in new bug reports, in any case.
 
Sorta, we’ve switched to Symfony Cache in 2.3 but the order in which files are updated is fiddly.

The cache layer is now disabled in the install app but the install app isn’t updated at the point the autoloader and class map are replaced.
 
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.1).

Change log:
Address even more one-click upgrade issues when caching is enabled
There may be a delay before changes are rolled out to the XenForo Community.
 
Back
Top Bottom