cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to clear cache

SOLVED

Unable to clear cache

Hi, im new to magento2.

Using TSO host shared server at the moment php7.1.5

on the admin section > system when I click on cache management I get this error.

as far as I can see it is only on this page?

 

Fatal error: Uncaught Error: Call to a member function setActive() on boolean in /var/sites/m/maritimebooks.co.uk/public_html/vendor/magento/module-backend/Model/View/Result/Page.php:27 Stack trace: #0 /var/sites/m/maritimebooks.co.uk/public_html/generated/code/Magento/Backend/Model/View/Result/Page/Interceptor.php(24): Magento\Backend\Model\View\Result\Page->setActiveMenu('Magento_Backend...') #1 /var/sites/m/maritimebooks.co.uk/public_html/vendor/magento/module-backend/Controller/Adminhtml/Cache/Index.php(20): Magento\Backend\Model\View\Result\Page\Interceptor->setActiveMenu('Magento_Backend...') #2 /var/sites/m/maritimebooks.co.uk/public_html/generated/code/Magento/Backend/Controller/Adminhtml/Cache/Index/Interceptor.php(24): Magento\Backend\Controller\Adminhtml\Cache\Index->execute() #3 /var/sites/m/maritimebooks.co.uk/public_html/vendor/magento/framework/App/Action/Action.php(107): Magento\Backend\Controller\Adminhtml\Cache\Index\Interceptor->execute() #4 /var/sites/m/maritimebooks.co.uk/public_html/vendor/magento/mo in /var/sites/m/maritimebooks.co.uk/public_html/vendor/magento/module-backend/Model/View/Result/Page.php on line 27

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Unable to clear cache

Hi @colinpuk

 

I understand the problem you are facing !

 

just quick question do you have SSH terminal command line access ? - if yes then open SSH terminal command line interface -> go to your magento 2 root director -> and run the below commands in sequence :

 

rm -rf generated

rm -rf var/cache

rm -rf var/generation

php bin/magento cache:clean

php bin/magento cache:flush

 

Then check - it will works !

if issue solved,Click Kudos & Accept as Solution

View solution in original post

2 REPLIES 2

Re: Unable to clear cache

Hi @colinpuk

 

I understand the problem you are facing !

 

just quick question do you have SSH terminal command line access ? - if yes then open SSH terminal command line interface -> go to your magento 2 root director -> and run the below commands in sequence :

 

rm -rf generated

rm -rf var/cache

rm -rf var/generation

php bin/magento cache:clean

php bin/magento cache:flush

 

Then check - it will works !

if issue solved,Click Kudos & Accept as Solution

Re: Unable to clear cache

Fatal error: Uncaught Error: Call to a member function setActive() on boolean in

To fix this issue you just need to remove the 'global.php' file from the 'generated/metadata' directory.

Ref: https://github.com/magento/magento2/issues/13504#issuecomment-370179188

Thank you