wakabayashi Posted May 30, 2017 Share Posted May 30, 2017 When I try to delete Cache I get the following: Call to undefined method PageCache::flush() at line 1267 in file controllers/admin/AdminPerformanceController.php php 1262. $redirectAdmin = true; 1263. Tools::clearSmartyCache(); 1264. Tools::clearXMLCache(); 1265. Media::clearCache(); 1266. Tools::generateIndex(); 1267. => PageCache::flush(); 1268. if (function_exists('opcache_reset')) { 1269. opcache_reset(); 1270. } 1271. } 1272. - AdminPerformanceControllerCore->postProcess - [line 379 - classes/controller/Controller.php] php 374. if ($this->checkAccess()) { 375. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 376. $this->setMedia(); 377. } 378. 379. => $this->postProcess(); 380. 381. if (!empty($this->redirect_after)) { 382. $this->redirect(); 383. } 384. - ControllerCore->run - [line 742 - classes/Dispatcher.php] php 737. if (isset($paramsHookActionDispatcher)) { 738. Hook::exec('actionDispatcher', $paramsHookActionDispatcher); 739. } 740. 741. // Running controller 742. => $controller->run(); 743. } catch (PrestaShopException $e) { 744. $e->displayMessage(); 745. } 746. } 747. - DispatcherCore->dispatch - [line 58 - admin/index.php] php 53. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) { 54. $_REQUEST['controller'] = strtolower($_REQUEST['tab']); 55. } 56. 57. // Prepare and trigger admin dispatcher 58. => Dispatcher::getInstance()->dispatch(); I am using redis and full page cache. Regards Link to comment Share on other sites More sharing options...
0 Traumflug Posted May 30, 2017 Share Posted May 30, 2017 PageCache::flush() exists: https://github.com/thirtybees/thirtybees/blob/1.0.x/classes/PageCache.php#L173 Are there overrides involved? cache/class_index.php deleted (will be re-built automatically) ? Link to comment Share on other sites More sharing options...
0 wakabayashi Posted May 30, 2017 Author Share Posted May 30, 2017 Yes the method is there... No I don't use any overrides for this class... I just deleted cache/class_index.php. But Still the same error. Link to comment Share on other sites More sharing options...
0 Traumflug Posted May 30, 2017 Share Posted May 30, 2017 Is PageCache in this class index? The section should look like this: php 'PageCache' => array ( 'path' => '', 'type' => 'class', 'override' => false, ), 'PageCacheCore' => array ( 'path' => 'classes/PageCache.php', 'type' => 'class', 'override' => false, ), Link to comment Share on other sites More sharing options...
0 braffas Posted May 30, 2017 Share Posted May 30, 2017 Are you 100% sure that there is no overrides? I previously used Page Cache from Jpresta (the class is called PageCache) it's included in the dispatcher override and it's still included when you chose to disable all overrides in the TB config AND it will also remain included when you uninstall the module. The module seems to have a hard time cleaning up. So check your overrides maybe there is something left behind. Just search your override folder for "/pagecache.php'" Link to comment Share on other sites More sharing options...
0 wakabayashi Posted May 30, 2017 Author Share Posted May 30, 2017 Looks the same: 'PageCache' => array ( 'path' => '', 'type' => 'class', 'override' => false, ), 'PageCacheCore' => array ( 'path' => 'classes/PageCache.php', 'type' => 'class', 'override' => false, ), Also it says no overrides. Any idea? Link to comment Share on other sites More sharing options...
0 wakabayashi Posted June 2, 2017 Author Share Posted June 2, 2017 Damn! Now I found it... In my modules folder there was a module "pagecache". This module wasn't even installed and no files were copied to the override folder. I deleted it and now it works fine. Is this a normal behaviour? It seems to me, that almost all problems I got with tb are name related. Link to comment Share on other sites More sharing options...
0 Traumflug Posted June 2, 2017 Share Posted June 2, 2017 If this module introduces a class "PageCache" or "PageCacheCore", then yes, that's not wanted, but expected. Link to comment Share on other sites More sharing options...
Question
wakabayashi
When I try to delete Cache I get the following: Call to undefined method PageCache::flush()
at line 1267 in file
controllers/admin/AdminPerformanceController.php
php 1262. $redirectAdmin = true; 1263. Tools::clearSmartyCache(); 1264. Tools::clearXMLCache(); 1265. Media::clearCache(); 1266. Tools::generateIndex(); 1267. => PageCache::flush(); 1268. if (function_exists('opcache_reset')) { 1269. opcache_reset(); 1270. } 1271. } 1272.
- AdminPerformanceControllerCore->postProcess - [line
379
-classes/controller/Controller.php
]php 374. if ($this->checkAccess()) { 375. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 376. $this->setMedia(); 377. } 378. 379. => $this->postProcess(); 380. 381. if (!empty($this->redirect_after)) { 382. $this->redirect(); 383. } 384.
- ControllerCore->run - [line
742
-classes/Dispatcher.php
]php 737. if (isset($paramsHookActionDispatcher)) { 738. Hook::exec('actionDispatcher', $paramsHookActionDispatcher); 739. } 740. 741. // Running controller 742. => $controller->run(); 743. } catch (PrestaShopException $e) { 744. $e->displayMessage(); 745. } 746. } 747.
- DispatcherCore->dispatch - [line
58
-admin/index.php
]php 53. if (!isset($_REQUEST['controller']) && isset($_REQUEST['tab'])) { 54. $_REQUEST['controller'] = strtolower($_REQUEST['tab']); 55. } 56. 57. // Prepare and trigger admin dispatcher 58. => Dispatcher::getInstance()->dispatch();
I am using redis and full page cache.
Regards
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now