Jump to content
ethan

after changing root directory module directory not changed

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)

Share this post


Link to post
Share on other sites

I have same problem is same situation, have you fixed it?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

So I guess it was the cache - anyway good to hear that the issue is solved 😃

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

If it's coming back and always related to tc_bannercmsblock module tc_bannercmsblock.php I recommend to report this to the modules author.

Share this post


Link to post
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..... 

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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.

 

Share this post


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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More