cancel
Showing results for 
Search instead for 
Did you mean: 

I Flushed Static Cache in Admin, now my site doesn't work

I Flushed Static Cache in Admin, now my site doesn't work

I clicked the Flush Static Cache button, but after doing so, my site lost all it's formatting.  I have tried a number of things which I read should fix it, but they didn't:

php bin/magento setup:upgrade

php bin/magento setup:di:compile 

php bin/magento setup:static-content:deploy 

php bin/magento indexer:reindex 

php bin/magento cache:flush

 

The formatting is still lost on the front end and if I try to get to the cache page in Admin, I get the following error.  Please help me!

 

1 exception(s):
Exception #0 (ReflectionException): Class Magento\User\Model\User\Interceptor does not exist

Exception #0 (ReflectionException): Class Magento\User\Model\User\Interceptor does not exist
<pre>#1 Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\User\Mod...') called at [vendor/magento/framework/ObjectManager/Definition/Runtime.php:54]
#2 Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\User\Mod...') called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:48]
#3 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\User\Mod...') called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#4 Magento\Framework\ObjectManager\ObjectManager->get('Magento\User\Mod...') called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:167]
#5 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(array('instance' => 'Magento\Backend\...'), 'Magento\Backend\...', NULL, 'credentialStorag...', 'Magento\Backend\...') called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:273]
#6 Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument('Magento\Backend\...', array('credentialStorag...', 'Magento\Backend\...', true, NULL, false), array()) called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:236]
#7 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\Backend\...', array(array('eventManager', 'Magento\Framewor...', true, NULL, false), array('backendData', 'Magento\Backend\...', true, NULL, false), array('authStorage', 'Magento\Backend\...', true, NULL, false), array('credentialStorag...', 'Magento\Backend\...', true, NULL, false), array('coreConfig', 'Magento\Framewor...', true, NULL, false), array('modelFactory', 'Magento\Framewor...', true, NULL, false)), array()) called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:34]
#8 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Backend\...', array(array('eventManager', 'Magento\Framewor...', true, NULL, false), array('backendData', 'Magento\Backend\...', true, NULL, false), array('authStorage', 'Magento\Backend\...', true, NULL, false), array('credentialStorag...', 'Magento\Backend\...', true, NULL, false), array('coreConfig', 'Magento\Framewor...', true, NULL, false), array('modelFactory', 'Magento\Framewor...', true, NULL, false)), array()) called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:59]
#9 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Backend\...') called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#10 Magento\Framework\ObjectManager\ObjectManager->get('Magento\Backend\...') called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:167]
#11 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(array('instance' => 'Magento\Backend\...'), 'Magento\Backend\...', NULL, 'auth', 'Magento\Backend\...') called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:273]
#12 Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument('Magento\Backend\...', array('auth', 'Magento\Backend\...', true, NULL, false), array()) called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:236]
#13 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('Magento\Backend\...', array(array('auth', 'Magento\Backend\...', true, NULL, false), array('formKeyValidator', 'Magento\Framewor...', true, NULL, false), array('backendUrl', 'Magento\Backend\...', true, NULL, false), array('redirectFactory', 'Magento\Framewor...', true, NULL, false), array('rawResultFactory', 'Magento\Framewor...', true, NULL, false)), array()) called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:34]
#14 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\Backend\...', array(array('auth', 'Magento\Backend\...', true, NULL, false), array('formKeyValidator', 'Magento\Framewor...', true, NULL, false), array('backendUrl', 'Magento\Backend\...', true, NULL, false), array('redirectFactory', 'Magento\Framewor...', true, NULL, false), array('rawResultFactory', 'Magento\Framewor...', true, NULL, false)), array()) called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:59]
#15 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Backend\...') called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#16 Magento\Framework\ObjectManager\ObjectManager->get('Magento\Backend\...') called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:203]
#17 Magento\Framework\ObjectManager\Factory\AbstractFactory->parseArray(array('csrf_validator' => array('instance' => 'CsrfRequestValid...'), 'http_method_vali...' => array('instance' => 'Magento\Framewor...'))) called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:179]
#18 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(array('csrf_validator' => array('instance' => 'CsrfRequestValid...'), 'http_method_vali...' => array('instance' => 'Magento\Framewor...')), NULL, NULL, 'validators', 'RequestValidator') called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:273]
#19 Magento\Framework\ObjectManager\Factory\AbstractFactory->getResolvedArgument('RequestValidator', array('validators', NULL, true, NULL, false), array('validators' => array('csrf_validator' => array('instance' => 'CsrfRequestValid...'), 'http_method_vali...' => array('instance' => 'Magento\Framewor...')))) called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:236]
#20 Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime('RequestValidator', array(array('validators', NULL, true, NULL, false)), array('validators' => array('csrf_validator' => array('instance' => 'CsrfRequestValid...'), 'http_method_vali...' => array('instance' => 'Magento\Framewor...')))) called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:34]
#21 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('RequestValidator', array(array('validators', NULL, true, NULL, false)), array('validators' => array('csrf_validator' => array('instance' => 'CsrfRequestValid...'), 'http_method_vali...' => array('instance' => 'Magento\Framewor...')))) called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:59]
#22 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('RequestValidator') called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#23 Magento\Framework\ObjectManager\ObjectManager->get('RequestValidator') called at [vendor/magento/framework/App/FrontController.php:71]
#24 Magento\Framework\App\FrontController->__construct(&Magento\Framework\App\RouterList#000000003fa8419e0000000003652f22#, &Magento\Framework\App\Response\Http\Interceptor#000000003fa840300000000003652f22#, NULL, NULL, NULL) called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:14]
#25 Magento\Framework\App\FrontController\Interceptor->__construct(&Magento\Framework\App\RouterList#000000003fa8419e0000000003652f22#, &Magento\Framework\App\Response\Http\Interceptor#000000003fa840300000000003652f22#, NULL, NULL, NULL) called at [vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:121]
#26 Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Magento\Framewor...', array(&Magento\Framework\App\RouterList#000000003fa8419e0000000003652f22#, &Magento\Framework\App\Response\Http\Interceptor#000000003fa840300000000003652f22#, NULL, NULL, NULL)) called at [vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:66]
#27 Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\Framewor...') called at [vendor/magento/framework/ObjectManager/ObjectManager.php:70]
#28 Magento\Framework\ObjectManager\ObjectManager->get('Magento\Framewor...') called at [vendor/magento/framework/App/Http.php:115]
#29 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#30 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#31 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000003fa840290000000003652f22#) called at [index.php:39]
</pre>

 

2 REPLIES 2

Re: I Flushed Static Cache in Admin, now my site doesn't work

Hi @bigbob2 

You need to remove generation folder. Then run all commands as you have listed.

rm -rf generated/*

Then run all commands :

php bin/magento setup:di:compile

sudo chmod -R 777 var/ pub/ generated/

If issue resolve, please click on 'Kudos' & Accept as Solution!

Re: I Flushed Static Cache in Admin, now my site doesn't work

The problem with this solution is that it completely opens the permissions on all the files in your website. Don't do it.