Fixed Weird error for upgrade to RC4

Mike Fara

Active member
Affected version
RC4
This is on a test instance... wanted to know if anyone has seen this or if its a known issue already?

Code:
Fatal error: Uncaught ArgumentCountError: Too few arguments to function Doctrine\Common\Cache\CacheProvider::__construct(), 0 passed in /web/test/src/XF/CacheFactory.php on line 251 and exactly 1 expected in /web/test/src/vendor-patch/Doctrine/Common/Cache/CacheProvider.php:19 Stack trace: #0 /web/test/src/XF/CacheFactory.php(251): Doctrine\Common\Cache\CacheProvider->__construct() #1 /web/test/src/XF/CacheFactory.php(81): XF\CacheFactory->createVoidCache(Array) #2 /web/test/src/XF/CacheFactory.php(36): XF\CacheFactory->instantiate('Void', Array) #3 /web/test/src/XF/App.php(707): XF\CacheFactory->create('Void', Array) #4 /web/test/src/XF/Container.php(234): XF\App->XF\{closure}('', Array, Object(XF\Container)) #5 /web/test/src/XF/App.php(2659): XF\Container->create('cache', '') #6 /web/test/src/XF/App.php(734): XF\App->cache('registry') #7 /web/test/src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container)) #8 /web/test/src/XF/Install/App.php(73): XF\Container->offsetGet('registry') #9 /web/test/src/XF/Container.php(31): XF\Install\App->XF\Install\{closure}(Object(XF\Container)) #10 /web/test/src/XF/App.php(2702): XF\Container->offsetGet('options') #11 /web/test/src/XF.php(838): XF\App->options() #12 /web/test/src/XF/Entity/User.php(2431): XF::options() #13 /web/test/src/XF/Mvc/Entity/Manager.php(72): XF\Entity\User::getStructure(Object(XF\Mvc\Entity\Structure)) #14 /web/test/src/XF/Repository/User.php(86): XF\Mvc\Entity\Manager->getEntityStructure('XF:User') #15 /web/test/src/XF/Repository/User.php(32): XF\Repository\User->getGuestUser() #16 /web/test/src/XF.php(586): XF\Repository\User->getVisitor(0) #17 /web/test/src/XF/Error.php(137): XF::visitor() #18 /web/test/src/XF/App.php(2496): XF\Error->logException(Object(ArgumentCountError), true, '') #19 /web/test/src/XF.php(202): XF\App->logException(Object(ArgumentCountError), true) #20 [internal function]: XF::handleException(Object(ArgumentCountError)) #21 {main} thrown in /web/test/src/vendor-patch/Doctrine/Common/Cache/CacheProvider.php on line 19

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Doctrine\Common\Cache\CacheProvider::__construct(), 0 passed in /web/test/src/XF/CacheFactory.php on line 251 and exactly 1 expected in /web/test/src/vendor-patch/Doctrine/Common/Cache/CacheProvider.php:19 Stack trace: #0 /web/test/src/XF/CacheFactory.php(251): Doctrine\Common\Cache\CacheProvider->__construct() #1 /web/test/src/XF/CacheFactory.php(81): XF\CacheFactory->createVoidCache(Array) #2 /web/test/src/XF/CacheFactory.php(36): XF\CacheFactory->instantiate('Void', Array) #3 /web/test/src/XF/App.php(707): XF\CacheFactory->create('Void', Array) #4 /web/test/src/XF/Container.php(234): XF\App->XF\{closure}('', Array, Object(XF\Container)) #5 /web/test/src/XF/App.php(2659): XF\Container->create('cache', '') #6 /web/test/src/XF/App.php(734): XF\App->cache('registry') #7 /web/test/src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container)) #8 /web/test/src/XF/Install/App.php(73): XF\Container->offsetGet('registry') #9 /web/test/src/XF/Container.php(31): XF\Install\App->XF\Install\{closure}(Object(XF\Container)) #10 /web/test/src/XF/App.php(2702): XF\Container->offsetGet('options') #11 /web/test/src/XF.php(838): XF\App->options() #12 /web/test/src/XF/Entity/User.php(2431): XF::options() #13 /web/test/src/XF/Mvc/Entity/Manager.php(72): XF\Entity\User::getStructure(Object(XF\Mvc\Entity\Structure)) #14 /web/test/src/XF/Repository/User.php(86): XF\Mvc\Entity\Manager->getEntityStructure('XF:User') #15 /web/test/src/XF/Repository/User.php(32): XF\Repository\User->getGuestUser() #16 /web/test/src/XF.php(586): XF\Repository\User->getVisitor(0) #17 /web/test/src/XF/Error.php(137): XF::visitor() #18 /web/test/src/XF/App.php(2496): XF\Error->logException(Object(ErrorException), true, '') #19 /web/test/src/XF.php(240): XF\App->logException(Object(ErrorException), true) #20 [internal function]: XF::handleFatalError() #21 {main} thrown in /web/test/src/vendor-patch/Doctrine/Common/Cache/CacheProvider.php on line 19
 
I formatted the error message so it's readable. It also looks like the same one twice, but it's not. The first stack trace is attempting to log ArgumentCountError while the second is ErrorException. Small difference though.

Code:
Fatal error:
Uncaught ArgumentCountError: Too few arguments to function Doctrine\Common\Cache\CacheProvider::__construct(),
0 passed in /web/test/src/XF/CacheFactory.php on line 251 and exactly 1 expected in /web/test/src/vendor-patch/Doctrine/Common/Cache/CacheProvider.php:19

Stack trace:
#0 /web/test/src/XF/CacheFactory.php(251): Doctrine\Common\Cache\CacheProvider->__construct()
#1 /web/test/src/XF/CacheFactory.php(81): XF\CacheFactory->createVoidCache(Array)
#2 /web/test/src/XF/CacheFactory.php(36): XF\CacheFactory->instantiate('Void', Array)
#3 /web/test/src/XF/App.php(707): XF\CacheFactory->create('Void', Array)
#4 /web/test/src/XF/Container.php(234): XF\App->XF\{closure}('', Array, Object(XF\Container))
#5 /web/test/src/XF/App.php(2659): XF\Container->create('cache', '')
#6 /web/test/src/XF/App.php(734): XF\App->cache('registry')
#7 /web/test/src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container))
#8 /web/test/src/XF/Install/App.php(73): XF\Container->offsetGet('registry')
#9 /web/test/src/XF/Container.php(31): XF\Install\App->XF\Install\{closure}(Object(XF\Container))
#10 /web/test/src/XF/App.php(2702): XF\Container->offsetGet('options')
#11 /web/test/src/XF.php(838): XF\App->options()
#12 /web/test/src/XF/Entity/User.php(2431): XF::options()
#13 /web/test/src/XF/Mvc/Entity/Manager.php(72): XF\Entity\User::getStructure(Object(XF\Mvc\Entity\Structure))
#14 /web/test/src/XF/Repository/User.php(86): XF\Mvc\Entity\Manager->getEntityStructure('XF:User')
#15 /web/test/src/XF/Repository/User.php(32): XF\Repository\User->getGuestUser()
#16 /web/test/src/XF.php(586): XF\Repository\User->getVisitor(0)
#17 /web/test/src/XF/Error.php(137): XF::visitor()
#18 /web/test/src/XF/App.php(2496): XF\Error->logException(Object(ArgumentCountError), true, '')
#19 /web/test/src/XF.php(202): XF\App->logException(Object(ArgumentCountError), true)
#20 [internal function]: XF::handleException(Object(ArgumentCountError))
#21 {main} thrown in /web/test/src/vendor-patch/Doctrine/Common/Cache/CacheProvider.php on line 19

Code:
Fatal error:
Uncaught ArgumentCountError:
Too few arguments to function Doctrine\Common\Cache\CacheProvider::__construct(),
0 passed in /web/test/src/XF/CacheFactory.php on line 251 and exactly 1 expected in /web/test/src/vendor-patch/Doctrine/Common/Cache/CacheProvider.php:19

Stack trace:
#0 /web/test/src/XF/CacheFactory.php(251): Doctrine\Common\Cache\CacheProvider->__construct()
#1 /web/test/src/XF/CacheFactory.php(81): XF\CacheFactory->createVoidCache(Array)
#2 /web/test/src/XF/CacheFactory.php(36): XF\CacheFactory->instantiate('Void', Array)
#3 /web/test/src/XF/App.php(707): XF\CacheFactory->create('Void', Array)
#4 /web/test/src/XF/Container.php(234): XF\App->XF\{closure}('', Array, Object(XF\Container))
#5 /web/test/src/XF/App.php(2659): XF\Container->create('cache', '')
#6 /web/test/src/XF/App.php(734): XF\App->cache('registry')
#7 /web/test/src/XF/Container.php(31): XF\App->XF\{closure}(Object(XF\Container))
#8 /web/test/src/XF/Install/App.php(73): XF\Container->offsetGet('registry')
#9 /web/test/src/XF/Container.php(31): XF\Install\App->XF\Install\{closure}(Object(XF\Container))
#10 /web/test/src/XF/App.php(2702): XF\Container->offsetGet('options')
#11 /web/test/src/XF.php(838): XF\App->options()
#12 /web/test/src/XF/Entity/User.php(2431): XF::options()
#13 /web/test/src/XF/Mvc/Entity/Manager.php(72): XF\Entity\User::getStructure(Object(XF\Mvc\Entity\Structure))
#14 /web/test/src/XF/Repository/User.php(86): XF\Mvc\Entity\Manager->getEntityStructure('XF:User')
#15 /web/test/src/XF/Repository/User.php(32): XF\Repository\User->getGuestUser()
#16 /web/test/src/XF.php(586): XF\Repository\User->getVisitor(0)
#17 /web/test/src/XF/Error.php(137): XF::visitor()
#18 /web/test/src/XF/App.php(2496): XF\Error->logException(Object(ErrorException), true, '')
#19 /web/test/src/XF.php(240): XF\App->logException(Object(ErrorException), true)
#20 [internal function]: XF::handleFatalError()
#21 {main} thrown in /web/test/src/vendor-patch/Doctrine/Common/Cache/CacheProvider.php on line 19
 
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).

Change log:
Address some lingering issues with caching during one-click upgrades
There may be a delay before changes are rolled out to the XenForo Community.
 
The fix is in the next release, but triggering the issue here can be a bit of a dice roll. In the event a one-click upgrade does error, proceeding with a manual upgrade should usually work.
 
Oops.. yeah I was also behind Rocket Loader so thats probably why I couldn't get around it as well. Thanks for the clarification.
The fix is in the next release, but triggering the issue here can be a bit of a dice roll. In the event a one-click upgrade does error, proceeding with a manual upgrade should usually work.
 
Back
Top Bottom