ethan Posted February 24, 2019 Share Posted February 24, 2019 (edited) Hi, I have moved the beta shop to live and front end is works fine and also back-end also works fine except module section it s throws error and i can see in debug still shows the beta root path. This exception throws when i click any module action like uninstall, reset, etc.. and in Alerts and updates tab PrestaShop version: 1.7.5.0 Compile Error: PrestaShop\PrestaShop\Adapter\Module\Module::instanciateLegacyModule(): Failed opening required '/home/beta/public_html/modules/tc_bannercmsblock/tc_bannercmsblock.php' (include_path='/home/live/public_html/vendor/pear/pear_exception:/home/live/public_html/vendor/pear/console_getopt:/home/live/public_html/vendor/pear/pear-core-minimal/src:/home/live/public_html/vendor/pear/archive_tar:.:/usr/share/php') Symfony\Component\Debug\Exception\FatalErrorException in src/Adapter/Module/Module.php (line 354) $path = $this->disk->get('path', ''); // Variable needed for empty() test if (empty($path)) { $this->disk->set('path', _PS_MODULE_DIR_ . DIRECTORY_SEPARATOR . $this->attributes->get('name')); } // End of temporary content require_once $this->disk->get('path') . DIRECTORY_SEPARATOR . $this->attributes->get('name') . '.php'; $this->instance = LegacyModule::getInstanceByName($this->attributes->get('name')); } /** * @param $attribute LOG DEBUG23:11:45 doctrine SELECT name FROM ps_module WHERE active = 1 INFO23:11:45 request Matched route "admin_module_notification". DEBUG23:11:45 security Read existing security token from the session. DEBUG23:11:45 security User was reloaded from a user provider. DEBUG23:11:45 doctrine SELECT name FROM ps_module WHERE active = 1 DEBUG23:11:45 doctrine SELECT p0_.id AS id_0, p0_.id_employee AS id_employee_1, p0_.id_module AS id_module_2, p0_.date_add AS date_add_3, p0_.date_upd AS date_upd_4 FROM ps_module_history p0_ WHERE p0_.id_employee = ? CRITICAL23:11:45 php Fatal Compile Error: PrestaShop\PrestaShop\Adapter\Module\Module::instanciateLegacyModule(): Failed opening required '/home/beta/public_html/modules/tc_bannercmsblock/tc_bannercmsblock.php' (include_path='/home/live/public_html/vendor/pear/pear_exception:/home/live/public_html/vendor/pear/console_getopt:/home/live/public_html/vendor/pear/pear-core-minimal/src:/home/live/public_html/vendor/pear/archive_tar:.:/usr/share/php') INFO23:11:45 php User Deprecated: Implementing "Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface" without the "reset()" method is deprecated since Symfony 3.4 and will be unsupported in 4.0 for class "Csa\Bundle\GuzzleBundle\DataCollector\GuzzleCollector". CRITICAL23:11:45 request Uncaught PHP Exception Symfony\Component\Debug\Exception\FatalErrorException: "Compile Error: PrestaShop\PrestaShop\Adapter\Module\Module::instanciateLegacyModule(): Failed opening required '/home/beta/public_html/modules/tc_bannercmsblock/tc_bannercmsblock.php' (include_path='/home/live/public_html/vendor/pear/pear_exception:/home/live/public_html/vendor/pear/console_getopt:/home/live/public_html/vendor/pear/pear-core-minimal/src:/home/live/public_html/vendor/pear/archive_tar:.:/usr/share/php')" at /home/live/public_html/src/Adapter/Module/Module.php line 354 Edited February 24, 2019 by ethan (see edit history) Link to comment Share on other sites More sharing options...
alerax Posted March 2, 2019 Share Posted March 2, 2019 I have same problem is same situation, have you fixed it? 1 Link to comment Share on other sites More sharing options...
JBW Posted March 4, 2019 Share Posted March 4, 2019 Have you deleted the cache after moving? Try to rename /var/cache to /var/cache_old. If this doesn't help, then try to deactivate module TC_BANNERCMSBLOCK in database table ps_modules directly. 1 Link to comment Share on other sites More sharing options...
ethan Posted March 4, 2019 Author Share Posted March 4, 2019 Hi, It worked for me after updating the version to 1.7.5.1. may be the update clears all the cache before update. fingers crossed good luck thanks Link to comment Share on other sites More sharing options...
ethan Posted March 4, 2019 Author Share Posted March 4, 2019 2 hours ago, JBW said: Have you deleted the cache after moving? Try to rename /var/cache to /var/cache_old. If this doesn't help, then try to deactivate module TC_BANNERCMSBLOCK in database table ps_modules directly. problem not only with that module it happens to all module even to prestashop default modules. Link to comment Share on other sites More sharing options...
JBW Posted March 4, 2019 Share Posted March 4, 2019 So I guess it was the cache - anyway good to hear that the issue is solved 😃 Link to comment Share on other sites More sharing options...
alerax Posted March 6, 2019 Share Posted March 6, 2019 On 3/4/2019 at 1:43 PM, JBW said: Have you deleted the cache after moving? Try to rename /var/cache to /var/cache_old. It worked, but somethimes the issue come back again and i have to delete var/cache/ folder Link to comment Share on other sites More sharing options...
JBW Posted March 6, 2019 Share Posted March 6, 2019 If it's coming back and always related to tc_bannercmsblock module tc_bannercmsblock.php I recommend to report this to the modules author. Link to comment Share on other sites More sharing options...
alerax Posted March 6, 2019 Share Posted March 6, 2019 4 hours ago, JBW said: If it's coming back and always related to tc_bannercmsblock module tc_bannercmsblock.php I recommend to report this to the modules author. no in my case is with rechapta but i guess the module that send the bug is random for every shop..... Link to comment Share on other sites More sharing options...
facethefuture Posted May 2, 2019 Share Posted May 2, 2019 I am also experiencing this issue with the modules section of the admin. We moved from test sub domain to live domain and I'm getting the error, but with the recaptcha module. I also can not uninstall / enable / disable any modules. Did anyone get a solution for this? Clearing cache did not work. Thanks in anticipation. Link to comment Share on other sites More sharing options...
JBW Posted May 2, 2019 Share Posted May 2, 2019 @facethefuture Whats the exact error message in your case? Link to comment Share on other sites More sharing options...
facethefuture Posted May 3, 2019 Share Posted May 3, 2019 @JBW The error was as follows: Compile Error: PrestaShop\PrestaShop\Adapter\Module\Module::instanciateLegacyModule(): Failed opening required '/home/DOMAIN/public_html/modules/contactform/recaptcha.php' (include_path='/home/DOMAIN/public_html/vendor/pear/pear_exception:/home/DOMAIN/public_html/vendor/pear/console_getopt:/home/DOMAIN/public_html/vendor/pear/pear-core-minimal/src:/home/DOMAIN/public_html/vendor/pear/archive_tar:.:/opt/cpanel/ea-php70/root/usr/share/pear') However, a developer have since done the following which is allowing me to use all the functions in modules section again: 1) disabled recaptcha module (not sure how he did this as it wouldn't let me disable, perhaps via ftp) 2) deleted cache folder 3) enabled recaptcha module again Hope that helps. Link to comment Share on other sites More sharing options...
Warbird Posted August 28, 2019 Share Posted August 28, 2019 (edited) Hi, I have a similar error. After moving the shop (v1.7.6.0) from the sub directory /PS/ in my domain to the roo, changing the URI inside prestashop and clearing the cache, I can't access the modules->alert page or the modules->update page and get errors when I try and disable a module on the page. The error log shows that all modules are still pointing towards the old subdirectory. After reading this I tried to: - remove the /var/cache/ folder (had to create an empty folder as nginx did not want to start anymore. -> no luck - went into the DB and disabled a few modules (I use the eicaptcha module) -> returning to the module page, multiple refreshed, removing the cache directory as well as clearing the cache from within PS backend and still the disables modules show up as enabled Bit at a loss here how to proceed next. Thanks for the help in avance. Edited August 28, 2019 by Warbird added version (see edit history) Link to comment Share on other sites More sharing options...
aytekinazmi12 Posted February 4, 2020 Share Posted February 4, 2020 Hello, I encountered the same error. It fixed when I changed the name of the / var / cache folder. Thank you. 1 Link to comment Share on other sites More sharing options...
gondolas Posted April 29, 2020 Share Posted April 29, 2020 Hi! Same error after unsuccessful uninstall SmartBlog (it has 6 or 7 different sub-modules) from back office. I cannot even access modules section at back office with the error: Compile Error: PrestaShop\PrestaShop\Adapter\Module\ModuleDataProvider::main(): Failed opening required '/var/www/html/preshop/modules/smartblog/classes/SmartBlogPost.php' (include_path='/var/www/html/preshop/vendor/pear/pear_exception:/var/www/html/preshop/vendor/pear/console_getopt:/var/www/html/preshop/vendor/pear/pear-core-minimal/src:/var/www/html/preshop/vendor/pear/archive_tar:.:/usr/share/php') I have clear var/cache and disable the modules from database. Is there a way to completely uninstall the modules manually or what could i do? thanks in advance! Link to comment Share on other sites More sharing options...
gondolas Posted April 29, 2020 Share Posted April 29, 2020 Ok I hope that i do write that I delete manually the directories of modules in /modules and for now solved! Link to comment Share on other sites More sharing options...
heyho Posted August 25, 2021 Share Posted August 25, 2021 As naytekin wrote: rename the folder var/cache to var/something and reload the page! 1 Link to comment Share on other sites More sharing options...
biello Posted September 6, 2022 Share Posted September 6, 2022 On 3/2/2019 at 9:58 PM, alerax said: I have same problem is same situation, have you fixed it? Thank you! It's work on 1.7.8.2. Link to comment Share on other sites More sharing options...
zaurus Posted March 8 Share Posted March 8 Hello, It's a cache problem, but don't forget to clear all cache not only from /cache/smarty/cache... & compile There is another cache cache that you need to empty /var/cache/dev/doctrine/ & /var/cache/prod/doctrine/ If you don't delete the ones above, you will keep getting hit by this problem Link to comment Share on other sites More sharing options...
zaurus Posted March 8 Share Posted March 8 one of the best solutions to troubleshoot such problems is to search at the file level for the name of the former domain or directory and thus you will see where the wrong settings are Link to comment Share on other sites More sharing options...
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