Jump to content

Error when modifying the main dir of my prestashop


Recommended Posts

Hello,

 

I am using prestashop 1.7.3.3

after installing and testing my shop in a subdirectory called /1/ on my server, I wanted to change the main directory of my shop so it could replace the old-site I was using, that's why I had to install and test it in a subdir before.

 

So now that I moved all files from /1/ to / and changed the physical_uri in the ps_shop_url table, and also regenerate the .htaccess everything is working fine except for some modules that I had to install during the dev phase in the subdirectory.

And now when I'm in the backoffice trying to access the Modules tab prestashop give me that error:

Symfony\Component\Debug\Exception\FatalErrorException: Compile Error: PrestaShop\PrestaShop\Adapter\Module\Module::instanciateLegacyModule(): Failed opening required '/flex/storage/website/site/www/1/modules/ps_featuredbrands/ps_featuredbrands.php' (include_path='/flex/storage/website/site/www/tools/htmlpurifier/standalone:/flex/storage/website/site/www/vendor/pear/pear_exception:/flex/storage/website/site/www/vendor/pear/console_getopt:/flex/storage/website/site/www/vendor/pear/pear-core-minimal/src:/flex/storage/website/site/www/vendor/pear/archive_tar:.:/usr/share/php:/usr/share/pear')
    at n/a
        in /flex/storage/website/site/www/src/Adapter/Module/Module.php line 320

 

by looking at the url it's trying to access : "www/1/modules/ps_featuredbrands/ps_featuredbrands.php"

we can see that the old url is still stored somewhere (in the symphony settings I believe).

 

Anyone know where I can find that old url stored ? or even regenerate the path ?

 

Thanks for your help

 

Edited by Alexenn (see edit history)
Link to comment
Share on other sites

6 minutes ago, Alexenn said:

Hello,

 

after installing and testing my shop in a subdirectory called /1/ on my server, I wanted to change the main directory of my shop so it could replace the old-site I was using, that's why I had to install and test it in a subdir before.

 

So now that I moved all files from /1/ to / and changed the physical_uri in the ps_shop_url table, and also regenerate the .htaccess everything is working fine except for some modules that I had to install during the dev phase in the subdirectory.

And now when I'm in the backoffice trying to access the Modules tab prestashop give me that error:


Symfony\Component\Debug\Exception\FatalErrorException: Compile Error: PrestaShop\PrestaShop\Adapter\Module\Module::instanciateLegacyModule(): Failed opening required '/flex/storage/website/site/www/1/modules/ps_featuredbrands/ps_featuredbrands.php' (include_path='/flex/storage/website/site/www/tools/htmlpurifier/standalone:/flex/storage/website/site/www/vendor/pear/pear_exception:/flex/storage/website/site/www/vendor/pear/console_getopt:/flex/storage/website/site/www/vendor/pear/pear-core-minimal/src:/flex/storage/website/site/www/vendor/pear/archive_tar:.:/usr/share/php:/usr/share/pear')
    at n/a
        in /flex/storage/website/site/www/src/Adapter/Module/Module.php line 320

 

by looking at the url it's trying to access : "www/1/modules/ps_featuredbrands/ps_featuredbrands.php"

we can see that the old url is still stored somewhere (in the symphony settings I believe).

 

Anyone know where I can find that old url stored ? or even regenerate the path ?

 

Thanks for your help

 

 

Have you cleared cache?

Link to comment
Share on other sites

2 minutes ago, Alexenn said:

I just cleared prestashop cache and my browser cache but the error is still there unfortunately

 

Just to ensure it's not a cache problem, you could try these things:

 

Manual cache clearing

  1. Using an FTP client or hosting file manager, go to the root directory of your site on the server.
  2. Delete content of the following directories (except index.php files):

        /cache/smarty/compile/
        /cache/smarty/cache/
        These are main cache directories. Also, if necessary, you can clean the following directories:

        /cache/cachefs/
        /img/tmp/
        /themes/your_theme/cache/
        Similarly, delete all files inside these directories, except for index.php files

   3. Delete file /cache/class_index.php. It is cache of PHP classes. You need to clear it when you make some overrides of classes and controllers.

   4. Cache cleared. Refresh the page you worked on and check the result.
 

Disabling cache
You can simply turn off the cache for a while, so that it doesn’t interfere with your work on the site. Don’t forget to enable it back after making changes, it significantly speed up PrestaShop!

  1. In the Back Office go to the page Advanced Parameters -> Performance.
  2. Turn on the option Template compilation: Force compilation and toggle “Cache” option to “No”.
  3. At the bottom of the page in the “Caching” block, turn off the “Use caching” option.
  4. In the block CCC (COMBINE, COMPRESS AND CACHE) turn off all options. These settings affect the caching of CSS and JS files.
  5. Save changes
  6. Cache cleared. Refresh the page you worked on and check the result.
  • Like 1
Link to comment
Share on other sites

  • 8 months later...
  • 7 months later...
  • 2 months later...
  • 1 year later...

Hi,

This solution works! Solved the error with Module Manager after moving the website from a subdomain to main domain.

I made a copy after both folders (dev and prod) before deleting....just in case something will crack.

"prod" folder was regenerated immediately..."dev" not yet ... but the error was solved and the Module Manager is accessible again.

Thanks

Link to comment
Share on other sites

En 28/2/2022 a las 4:46 PM, dany2234 dijo:

Hi,

This solution works! Solved the error with Module Manager after moving the website from a subdomain to main domain.

I made a copy after both folders (dev and prod) before deleting....just in case something will crack.

"prod" folder was regenerated immediately..."dev" not yet ... but the error was solved and the Module Manager is accessible again.

Thanks

"dev" is used when you enable DEBUG mode.

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...