Scully Posted August 10, 2017 Share Posted August 10, 2017 (edited) I see a lot of problems caused by changes within PrestaShop wich are avoidable. Sometimes it's a complete shop upgrade, or the installation of a new module or a change that might have looked straight forward but ended in troubles. Shop front end is broken, back end brocken or even both sides down. Or other vital functionality which causes erros after a change. This short guide might help to avoid some of these troubles. If it is considered as helpful, a moderator might pin this post. Before upgrading the shop or installing a new modules Make a full backup of your server. It sounds simple and it is. It helps you to avoid endless troubles and shop downtimes. Most of todays hosting panels allow to make a full backup with a single click. If you get stuck and you can't resolve the problem within reasonable time, just roll back by restoring your backup data. A restore takes minutes. But solving an issue with a broken front end might take hours. Before installing additional modules Give it a second and ask yourself: Do I really need the module, is it essential for me? Of course, there are many helpful modules available. But also others which are slugishly programmed, a source of injection attempts or not as helpful as an installation would be required. And don't forget: all modules add to complexity and processing time. Your shop won't run faster if you have plenty of modules installed. When uninstalling modules Run the uninstall comand from the backoffice - modules section. Do not delete the modules path before you have run the uninstall sucessfully. Why? Modules register hooks. This registration is stored outside the modules path. If you just delete the module's path without having uninstalled it, you are quite likely getting error messages like "undefined method" or similar. If you change code (TPL, PHP, CSS) Make a copy of the original file. Name it something like original.tpl.datestamp. If you get stuck with an error, you can easily revert back. And when changing code. Use the comment section in the beginning to document your changes. Date, kind or reason of change and maybe a line number. There is one day coming when ask yourself what you have changed in there. If you make a copy of .tpl files, do not use .tpl as the file extension for the copy. If you do so, you get both, changed and old file included to the translation section in your backoffice. If your are stuck with an error Enable DEV mode in your defince.inc.php in your config path: define('_PS_MODE_DEV_', true ); DEV mode gives you enhanced debug messages which often allow to analzye or isolate a problem. Furthermore, log into your server and check the webservers error logfile. Some hosting panels also allow to do this from within a webbrowser session within your hosting panels. The error logfiles also give helpful indication on where or how to fix a problem. In many cases you get cleartext errors together with line numbers. If you face front end problems, you can also start the developer tools from your browser. In most browsers you can hit F12 and you get a toolbar or window with debug and inspection tools. If your can't solve a problem on your own Before posting search the froum! Other users may have encountered the same probles. In many cases, searching by error message helps. You can also use google to help searching. For example: if you run PrestaShop 1.6. and you have an error 500, you could google like this: site:prestashop.com 1.6 error 500 If you don't find a solution - make a new post for your problem. Don't forget to mention your prestashop version in use and the exact error message or error condition you are faced with. In many cases, screenshots are also helpful. And last but not least: Give your post a meaningful title. It helps other users to identify posts where they can help with their expertise. Bad Topic Title : Error Good Topic Title: PS 1.7.2 - error 500 when registering new customer If you problem is solved Report back. It's a pity that many posts remain unanswered. Any solution posted and reported back helps others from the community and motivates each of us to help you out. Good luck! Edited August 10, 2017 by Scully (see edit history) 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