Jump to content

Help errors in the front-office


Esmoof

Recommended Posts

Hello friends, I was trying these days to build a store and installing modules in my prestashop and I had this problem.

Error 500 in the back-office after uninstalling a "Pretty URL" module that did not work correctly and activating a function to modify Dispatcher.php

When I deactivate Debug Mode the front-office works, but the back-office gives error 500.

With the debug mode activated I see the following errors in the front-office.

Warning: file_put_contents(/opt/bitnami/apps/prestashop/htdocs/var/cache/dev/FrontContainer.php): failed to open stream: Permission denied in /opt/bitnami/apps/prestashop/htdocs/src/Adapter/ContainerBuilder.php on line 68

Whoops, looks like something went wrong.

 

(1/1) ContextErrorException

Warning: touch(): Utime failed: Permission denied

in smarty_template_compiled.php line 178
at Smarty_Template_Compiled->compileTemplateSource(object(SmartyDevTemplate))in smarty_template_compiled.php line 141
at Smarty_Template_Compiled->process(object(SmartyDevTemplate))in smarty_template_compiled.php line 105
at Smarty_Template_Compiled->render(object(SmartyDevTemplate))in smarty_internal_template.php line 216
at Smarty_Internal_Template->render(false, 0)in smarty_internal_templatebase.php line 232
at Smarty_Internal_TemplateBase->_execute(object(SmartyDevTemplate), null, null, null, 0)in smarty_internal_templatebase.php line 116
at Smarty_Internal_TemplateBase->fetch(null, null, null, null, false, true, false)in SmartyDevTemplate.php line 40
at SmartyDevTemplateCore->fetch()in Module.php line 2413
at ModuleCore->fetch('module:stgadwordsconversion/views/templates/hook/header.tpl', 'stgadwordsconversion|1|6')in stgadwordsconversion.php line 309
at StGAdwordsConversion->hookDisplayHeader(array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 5))in Hook.php line 966
at HookCore::coreCallHook(object(StGAdwordsConversion), 'hookdisplayHeader', array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 5))in Hook.php line 351
at HookCore::callHookOn(object(StGAdwordsConversion), 'displayHeader', array('cookie' => object(Cookie), 'cart' => object(Cart), 'altern' => 5))in Hook.php line 903
at HookCore::exec('displayHeader')in FrontController.php line 555
at FrontControllerCore->initContent()in IndexController.php line 37
at IndexControllerCore->initContent()in Controller.php line 281
at ControllerCore->run()in Dispatcher.php line 511
at DispatcherCore->dispatch()in index.php line 28

 

Link to comment
Share on other sites

Two things you can try:

1. Remove the cache by deleting /var/cache/dev/
2. Check if the override of Pretty URL module (probaly Dispatcher.php) is correclly removed from override directory

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

it probably means you have a wrong ownership on your files, depending on your hosting setup check if the apache user (e.g www-data) owns the files, in this case the perms have to be  0755 for directories and 0644 for files or if your files ownership is like user:apache user, you'll probably need to set up the perms as 0775 for directories and 0664 for files.

Link to comment
Share on other sites

I am a Root but the permissions given to Prestashop to carry out their work are not the correct ones.

It is a hosting created with bitnami with an instance of Prestashop in Google Cloud. There are many problems of permissions in Prestashop with the instances that they deploy. In order to upload files or modify them I have to log in as a root from a console and put 777 to the file I want to modify through FTP and then change the permissions again. It is a fudge.

From Prestashop you have to give a warning to Bitnami because it is creating a bad reputation in the operation of Prestashop, because they create instances without permission for the proper functioning of Prestashop.

Users are caught in problems of permissions, updates that can not be done correctly, modules that do not work, javascript that does not run ... etc ... etc ..

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

Hi,

I can give you solution with that:

1. Go to /var directory and delete "cache" folder.

Refresh page and cache folder will be regenerated. After that your issue should be fixed.

that happens because Prestashop 1.7 save appParameters.php file with connection parameters cached into this folder. then if you change parameters in app/config/parameters.php, that is not enought, because the old one is cached into this folder.

Best regards!

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