mema99 Posted January 14, 2013 Share Posted January 14, 2013 I am a recent PrestaShop user (Nov 2012) with version 1.5. I am in the development stage of a client store front. I updated to 1.5.3.1 this morning hoping to fix the problem with missing product images that started when I did the last update of 1.5.2. The product images are now showing. Issue I have now is that I want to add an image to certain subcategories so that they show on the top category screen. I do not like to experiment or modify source code unless necessary. I leave that to people who have a better understanding of the functionality of PrestaShop. Not sure if this is a bug, but the following is what appears after trying to save the category after choosing an image from my computer browse. It looks like a lot of files are effected. Anyone? or is the a bug in the latest version. [PrestaShopException] Property Category->date_add is not valid at line 837 in file classes/ObjectModel.php 831. 832. $message = $this->validateField($field, $this->$field); 833. if ($message !== true) 834. { 835. if ($die) 836. throw new PrestaShopException($message); 837. return $error_return ? $message : false; 838. } 839. } 840. 841. return true; ObjectModelCore->validateFields - [line 264 - classes/ObjectModel.php] - [0 Argument] ObjectModelCore->getFields - [line 598 - classes/ObjectModel.php] - [0 Argument] ObjectModelCore->update - [line 209 - classes/Category.php] - [1 Arguments] CategoryCore->update - [line 719 - classes/controller/AdminController.php] - [0 Argument] AdminControllerCore->processUpdate - [line 626 - classes/controller/AdminController.php] - [0 Argument] AdminControllerCore->processSave - [line 541 - classes/controller/AdminController.php] - [0 Argument] AdminControllerCore->postProcess - [line 521 - controllers/admin/AdminCategoriesController.php] - [0 Argument] AdminCategoriesControllerCore->postProcess - [line 158 - classes/controller/Controller.php] - [0 Argument] ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument] DispatcherCore->dispatch - [line 50 - admin123/index.php] - [0 Argument] Link to comment Share on other sites More sharing options...
WIZZAH Posted January 17, 2013 Share Posted January 17, 2013 (edited) After updating from 1.5.2 to 1.5.3.1 I have a similar exception when changing any data of an existing category. Any fixes for this problem? [EDIT: added the error message] [PrestaShopException] Property Category->date_add is not valid at line 837in file classes/ObjectModel.php 831. 832. $message = $this->validateField($field, $this->$field); 833. if ($message !== true) 834. { 835. if ($die) 836. throw new PrestaShopException($message); 837. return $error_return ? $message : false; 838. } 839. } 840. 841. return true; ObjectModelCore->validateFields - [line 264 - classes/ObjectModel.php] - [0 Argument] ObjectModelCore->getFields - [line 598 - classes/ObjectModel.php] - [0 Argument] ObjectModelCore->update - [line 209 - classes/Category.php] - [1 Arguments] CategoryCore->update - [line 719 - classes/controller/AdminController.php] - [0 Argument] AdminControllerCore->processUpdate - [line 626 - classes/controller/AdminController.php] - [0 Argument] AdminControllerCore->processSave - [line 541 - classes/controller/AdminController.php] - [0 Argument] AdminControllerCore->postProcess - [line 521 - controllers/admin/AdminCategoriesController.php] - [0 Argument] AdminCategoriesControllerCore->postProcess - [line 158 - classes/controller/Controller.php] - [0 Argument] ControllerCore->run - [line 348 - classes/Dispatcher.php] - [0 Argument] DispatcherCore->dispatch - [line 50 - winkelbeheer/index.php] - [0 Argument] Edited January 17, 2013 by WIZZAH (see edit history) Link to comment Share on other sites More sharing options...
WIZZAH Posted January 17, 2013 Share Posted January 17, 2013 I found a topic in the Spanish forum about this problem with a solution : http://www.prestashop.com/forums/index.php?/topic/215759-problema-meta-keywords-solucionado/page__view__findpost__p__1065713 After checking my ps_category table with phpMyAdmin I found that some categories have "0000-00-00 00:00:00" as a value for the field "date_add". In my table only 4 fields where zero, so I changed the fields by hand into a value smaller then the "date_upd" field next to it. The error above has now gone for me and I can edit my categories. No new zero fields appear, even after adding new categories. Many thanks to Adsoa for the solution. Gracias! Este problema lo tuve yo cuando intentaba añadir imagenes a categorias y revisando la tabla ps_category me dí cuenta que en la columna date_add estaban con el siguiente valor "0000-00-00 00:00:00". La solución sería hacer el siguiente UPDATE: UPDATE ps_category SET date_add = sysdate() WHERE id_category > 2; A mi me funcionó asi, ya me contaras. Nota: mi identificador de tablas es "ps_" revisa antes de nada cual es el tuyo. Un saludo. 3 Link to comment Share on other sites More sharing options...
Adsoa Posted January 17, 2013 Share Posted January 17, 2013 a pleasure that my solution has served more users. Greetings from Spain. 1 Link to comment Share on other sites More sharing options...
mema99 Posted January 17, 2013 Author Share Posted January 17, 2013 Wizzah, Thanks for the posting. I had 7 "date_add" entries that had "0000-00-00 00:00:00". After I updated the fields as suggested, I went into one of the categories and entered a description before I tried to upload an image. No error, however the category somehow was moved to another root category as a sub cat. Tried moving back to root and it totally disappeared. Now waiting for database to be restored from earlier backup so that I can carefully repeat fix. Products still appearing in product list under missing category. Ready to scream in frustration. Link to comment Share on other sites More sharing options...
WIZZAH Posted January 17, 2013 Share Posted January 17, 2013 fingers crossed Link to comment Share on other sites More sharing options...
Adsoa Posted January 17, 2013 Share Posted January 17, 2013 Wizzah, Thanks for the posting. I had 7 "date_add" entries that had "0000-00-00 00:00:00". After I updated the fields as suggested, I went into one of the categories and entered a description before I tried to upload an image. No error, however the category somehow was moved to another root category as a sub cat. Tried moving back to root and it totally disappeared. Now waiting for database to be restored from earlier backup so that I can carefully repeat fix. Products still appearing in product list under missing category. Ready to scream in frustration. Hi Mema. First of all, sorry for my english . reviews the field called "level_depth" table "ps_category" and make sure the values are the "2" category father, the "3" category descending from the parent category, etcetera. Try this and you tell me something regards. Link to comment Share on other sites More sharing options...
mema99 Posted January 17, 2013 Author Share Posted January 17, 2013 Hi Adsoa, I did suspect that something happened to the level_depth and did find that the number jumped to "255". I corrected it to "2", but somehow when I went back into the admin area of the store, two categories that had the "255" vanished. The backup being restored soon by server tech staff. Thank you for your "help" I will post when all resolved. Link to comment Share on other sites More sharing options...
mema99 Posted January 17, 2013 Author Share Posted January 17, 2013 Hi Adsoa and Wizzah, Thank You both. Database restored. I seem to have everything working NOW. Once I fixed the "date_add" issue, I also had to pay close attention the "level_depth" and "id_parent". I have one question that you may be able to help me with. On the main category list, how do I get a Plus sign to show on a category that has sub categories. It was there before. I APPRECIATE YOUR ASSISTANCE. Link to comment Share on other sites More sharing options...
WIZZAH Posted January 25, 2013 Share Posted January 25, 2013 I would try reinstalling or resetting the block categories module now your DB is tidy again. Hope this helps.. Link to comment Share on other sites More sharing options...
S7 Media Ltd Posted February 24, 2013 Share Posted February 24, 2013 Thankyou very much indeed, this fixed my problem also. Link to comment Share on other sites More sharing options...
fsfireworks Posted September 17, 2013 Share Posted September 17, 2013 you guys and gals rock...... I imported from zencart had same problem found this and ill be fixed. you saved me hours of head knocking. THANK YOU>..... Link to comment Share on other sites More sharing options...
harun_andreas Posted February 13, 2014 Share Posted February 13, 2014 Terima Kasih atas Solusinya (thanks for the solution) Link to comment Share on other sites More sharing options...
jasonbestbuyuniforms Posted May 16, 2014 Share Posted May 16, 2014 Ran into the same issue and this solution worked. Thanks a bunch! Link to comment Share on other sites More sharing options...
gopetsquad Posted May 27, 2014 Share Posted May 27, 2014 Hello, I am having the same issue. How do I access the database to make these changes. I am using a hosting company that installed for me. I have a file transfer program called Filezilla but I do not see the databases in my Prestashop directory. Thanks! Link to comment Share on other sites More sharing options...
Adsoa Posted May 27, 2014 Share Posted May 27, 2014 Hello, I am having the same issue. How do I access the database to make these changes. I am using a hosting company that installed for me. I have a file transfer program called Filezilla but I do not see the databases in my Prestashop directory. Thanks! Hello. The database you can find it in your hosting, you will have a section called "Databases" or "MySQL" or something similar. In Filezilla is only the files you need to run prestashop. Hope that helps. A greeting. Adsoa. Link to comment Share on other sites More sharing options...
gopetsquad Posted May 27, 2014 Share Posted May 27, 2014 Ok cool. Thank you Adsoa! 1 Link to comment Share on other sites More sharing options...
vekia Posted May 27, 2014 Share Posted May 27, 2014 Hello, I am having the same issue. How do I access the database to make these changes. I am using a hosting company that installed for me. I have a file transfer program called Filezilla but I do not see the databases in my Prestashop directory. Thanks! what hosting management software you've got? cPanel? Link to comment Share on other sites More sharing options...
CSEpe Posted October 1, 2014 Share Posted October 1, 2014 Wizzah: Changing the date worked! 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