Jump to content

after changing root directory module directory not changed


ethan

Recommended Posts

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

  1.         $path $this->disk->get('path'''); // Variable needed for empty() test
  2.         if (empty($path)) {
  3.             $this->disk->set('path'_PS_MODULE_DIR_ DIRECTORY_SEPARATOR $this->attributes->get('name'));
  4.         }
  5.         // End of temporary content
  6.         require_once $this->disk->get('path') . DIRECTORY_SEPARATOR $this->attributes->get('name') . '.php';
  7.         $this->instance LegacyModule::getInstanceByName($this->attributes->get('name'));
  8.     }
  9.  
  10.     /**
  11.      * @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 by ethan (see edit history)
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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

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

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

  • 1 month later...

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

@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

  • 3 months later...

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 by Warbird
added version (see edit history)
Link to comment
Share on other sites

  • 5 months later...
  • 2 months later...

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

  • 1 year later...
  • 1 year later...
  • 1 year later...

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...