pietruzzo Posted September 14, 2016 Share Posted September 14, 2016 Hi. I'm having some trouble while updatig data from backoffice in prestashop 1.6.5. Any attempt of saving changes from product/ category tabs gets an http error 500. I'm on Keliweb server and they told me there should be some problems with a module or the ps_smarty_lazy cache table.. if I try to select the table on php myadmin I get an error notice (ps smarty_lazy_cache doesn't exist). Could you please tell me whether this is the problem that generated the server errors and how I could fix it? Thanks in advance. Link to comment Share on other sites More sharing options...
selectshop.at Posted September 14, 2016 Share Posted September 14, 2016 I suppose your shop is an upgrade ? Sometimes on upgrades this table is missing. BEFORE you manipulate your database manually, please make a back-up of it. On your back-office, tab "advanced parameters -> DB back-up". Add ps_lazy_cache manually to you database with phpMyAdmin and SQL-query: DROP TABLE IF EXISTS `PREFIX_smarty_lazy_cache`; CREATE TABLE `PREFIX_smarty_lazy_cache` ( `template_hash` varchar(32) NOT NULL DEFAULT '', `cache_id` varchar(255) NOT NULL DEFAULT '', `compile_id` varchar(32) NOT NULL DEFAULT '', `filepath` varchar(255) NOT NULL DEFAULT '', `last_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`template_hash`, `cache_id`, `compile_id`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; The PREFIX you should change to the prefix of your database tables. Native install it is ps_, but if you changed, you should change to the one you used. If your shop is a native install, and nothing changed when installed, so the query is: DROP TABLE IF EXISTS `ps_smarty_lazy_cache`; CREATE TABLE `ps_smarty_lazy_cache` ( `template_hash` varchar(32) NOT NULL DEFAULT '', `cache_id` varchar(255) NOT NULL DEFAULT '', `compile_id` varchar(32) NOT NULL DEFAULT '', `filepath` varchar(255) NOT NULL DEFAULT '', `last_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`template_hash`, `cache_id`, `compile_id`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; If you don't know how to use SQL-queries, please ask your provider or somebody else. 6 1 Link to comment Share on other sites More sharing options...
pietruzzo Posted September 14, 2016 Author Share Posted September 14, 2016 Thanks for your quick reply. Actually thete was no upgrade recently. I got those http errors an then I checked on the tables list and realized that smart lazy cache wasn't there. In my latest backup there was the table and some values in it. I can't figure out what's happened. Any idea about that? Thanks again. Link to comment Share on other sites More sharing options...
selectshop.at Posted September 14, 2016 Share Posted September 14, 2016 Don't know what was done on your database ?? Simply add the table manually with SQL-Query and the error disappears. Link to comment Share on other sites More sharing options...
roed Posted January 26, 2017 Share Posted January 26, 2017 I have also suddenly gotten this error. When trying to create the table again with the script or manually in phpmyadmin, the server denies saying: #1005 - Can't create table 'thatsminedk.ps_smarty_lazy_cache' (errno: -1) Any advise is greatly appreciated! Link to comment Share on other sites More sharing options...
hypa3000 Posted April 20, 2017 Share Posted April 20, 2017 I also had blank page issue (possibly due to migration from PS Cloud to PS Native installation) found the error message when I turned ('_PS_MODE_DEV_', false) to true This Fixed Worked a treat, Thank you very much! I suppose your shop is an upgrade ? Sometimes on upgrades this table is missing. BEFORE you manipulate your database manually, please make a back-up of it. On your back-office, tab "advanced parameters -> DB back-up". Add ps_lazy_cache manually to you database with phpMyAdmin and SQL-query: DROP TABLE IF EXISTS `PREFIX_smarty_lazy_cache`; CREATE TABLE `PREFIX_smarty_lazy_cache` ( `template_hash` varchar(32) NOT NULL DEFAULT '', `cache_id` varchar(255) NOT NULL DEFAULT '', `compile_id` varchar(32) NOT NULL DEFAULT '', `filepath` varchar(255) NOT NULL DEFAULT '', `last_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`template_hash`, `cache_id`, `compile_id`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; The PREFIX you should change to the prefix of your database tables. Native install it is ps_, but if you changed, you should change to the one you used. If your shop is a native install, and nothing changed when installed, so the query is: DROP TABLE IF EXISTS `ps_smarty_lazy_cache`; CREATE TABLE `ps_smarty_lazy_cache` ( `template_hash` varchar(32) NOT NULL DEFAULT '', `cache_id` varchar(255) NOT NULL DEFAULT '', `compile_id` varchar(32) NOT NULL DEFAULT '', `filepath` varchar(255) NOT NULL DEFAULT '', `last_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`template_hash`, `cache_id`, `compile_id`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; If you don't know how to use SQL-queries, please ask your provider or somebody else. Just pasted native install code above into SQL field in the DB 'PHPmyAdmin' while on main table structure page (so just left as 'ps_smarty_lazy_cache') Cheers Link to comment Share on other sites More sharing options...
sassbar Posted May 15, 2017 Share Posted May 15, 2017 Thank you so much!It's helped me too: DROP TABLE IF EXISTS `ps_smarty_lazy_cache`;CREATE TABLE `ps_smarty_lazy_cache` (`template_hash` varchar(32) NOT NULL DEFAULT '',`cache_id` varchar(255) NOT NULL DEFAULT '',`compile_id` varchar(32) NOT NULL DEFAULT '',`filepath` varchar(255) NOT NULL DEFAULT '',`last_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',PRIMARY KEY (`template_hash`, `cache_id`, `compile_id`)) ENGINE=InnoDB DEFAULT CHARSET=utf8; I was error when changed order status. I has found that table `ps_smarty_lazy_cache` is corrupted. the deleting and newly recreating it was solved my problem. Link to comment Share on other sites More sharing options...
vrijndesteede Posted June 13, 2017 Share Posted June 13, 2017 I suppose your shop is an upgrade ? Sometimes on upgrades this table is missing. BEFORE you manipulate your database manually, please make a back-up of it. On your back-office, tab "advanced parameters -> DB back-up". Add ps_lazy_cache manually to you database with phpMyAdmin and SQL-query: DROP TABLE IF EXISTS `PREFIX_smarty_lazy_cache`; CREATE TABLE `PREFIX_smarty_lazy_cache` ( `template_hash` varchar(32) NOT NULL DEFAULT '', `cache_id` varchar(255) NOT NULL DEFAULT '', `compile_id` varchar(32) NOT NULL DEFAULT '', `filepath` varchar(255) NOT NULL DEFAULT '', `last_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`template_hash`, `cache_id`, `compile_id`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; The PREFIX you should change to the prefix of your database tables. Native install it is ps_, but if you changed, you should change to the one you used. If your shop is a native install, and nothing changed when installed, so the query is: DROP TABLE IF EXISTS `ps_smarty_lazy_cache`; CREATE TABLE `ps_smarty_lazy_cache` ( `template_hash` varchar(32) NOT NULL DEFAULT '', `cache_id` varchar(255) NOT NULL DEFAULT '', `compile_id` varchar(32) NOT NULL DEFAULT '', `filepath` varchar(255) NOT NULL DEFAULT '', `last_update` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`template_hash`, `cache_id`, `compile_id`) ) ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; If you don't know how to use SQL-queries, please ask your provider or somebody else. Worked perfect for me! I only had to remove ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; Link to comment Share on other sites More sharing options...
Aurelink_ Posted July 16, 2018 Share Posted July 16, 2018 Hi, I tried your answer. but I had a new error and I can't figured it out : It's : #1071 - Specified key was too long; max key length is 767 bytes Anyone ? Regards Link to comment Share on other sites More sharing options...
gaid Posted January 1, 2019 Share Posted January 1, 2019 On 6/13/2017 at 12:28 PM, vrijndesteede said: Worked perfect for me! I only had to remove ENGINE=ENGINE_TYPE DEFAULT CHARSET=utf8; Change Engine_Type on own, for example InnoDB 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