kashyyyk Posted September 11, 2012 Share Posted September 11, 2012 I'm trying to duplicate a product and I'm getting an error messege- 1 error An error occurred while creating object. I tried to do it with and without the image and get the same thing. I just tried to create a new product, and I'm getting the same messege. The only thing I've done is I populated the site with items using the csv import I'm using PrestaShop™ 1.4.9.0 Any ideas I can look at to figure this out would be a great help. Dan Link to comment Share on other sites More sharing options...
kashyyyk Posted September 11, 2012 Author Share Posted September 11, 2012 I didn't mention, my uploading items through the CSV works fine and I can edit and modify products. I turned on the debug but get no additional messege. In another post someone mentioned they had the same thing and it was a database error. I can export my database and look through it. What should I look for? Link to comment Share on other sites More sharing options...
kashyyyk Posted September 11, 2012 Author Share Posted September 11, 2012 Fixed it. When I was setting up my dtatabase I was moving my ebay items in and I used ebays item as a product id on a couple things, which can't be done. I had to export all the tables that had them. Each number I replaced with a new smaller number for each instance, I then deleted the instance of them from the database DELETE FROM `ps_category_product` WHERE id_product IN (####); DELETE FROM `ps_product` WHERE id_product IN (####); DELETE FROM `ps_product_lang` WHERE id_product IN (####); DELETE FROM `ps_attribute_impact` WHERE id_product IN (####); DELETE FROM `ps_product_download` WHERE id_product IN (####); DELETE FROM `ps_product_sale` WHERE id_product IN (####); DELETE FROM `ps_product_tag` WHERE id_product IN (####); DELETE FROM `ps_scene_products` WHERE id_product IN (####); DELETE FROM `ps_search_index` WHERE id_product IN (####); DELETE FROM `ps_stock_mvt` WHERE id_product IN (####); DELETE FROM `ps_accessory` WHERE id_product_1 IN (####); DELETE FROM `ps_accessory` WHERE id_product_2 = (####); DELETE FROM `ps_product_attachment` WHERE id_product IN (#####); DELETE FROM `ps_feature_product` WHERE id_product IN (####); DELETE FROM `ps_customization_field` WHERE id_product IN (####); DELETE FROM `ps_specific_price` WHERE id_product IN (####); DELETE FROM `ps_product_attribute` WHERE id_product IN (####); DELETE FROM `ps_image` WHERE id_product IN (####); DELETE FROM `ps_image_lang` WHERE id_image IN (####); I also did a search of the numbers in the database and removed any indexed. I then inserted them back with their new product numbers and the big thing I also had to do was reset the auto increment in ps_product, I can now duplicate and create new items 1 Link to comment Share on other sites More sharing options...
Patric Posted September 11, 2012 Share Posted September 11, 2012 So I mark the topic as [solved]. Please, next time, do it by yourself by adding [solved] at the beginning of the topic's title. See here how to do. Thanks. ;-) Link to comment Share on other sites More sharing options...
giftsforyounme Posted September 12, 2012 Share Posted September 12, 2012 Fixed it. When I was setting up my dtatabase I was moving my ebay items in and I used ebays item as a product id on a couple things, which can't be done. I had to export all the tables that had them. Each number I replaced with a new smaller number for each instance, I then deleted the instance of them from the database DELETE FROM `ps_category_product` WHERE id_product IN (####); DELETE FROM `ps_product` WHERE id_product IN (####); DELETE FROM `ps_product_lang` WHERE id_product IN (####); DELETE FROM `ps_attribute_impact` WHERE id_product IN (####); DELETE FROM `ps_product_download` WHERE id_product IN (####); DELETE FROM `ps_product_sale` WHERE id_product IN (####); DELETE FROM `ps_product_tag` WHERE id_product IN (####); DELETE FROM `ps_scene_products` WHERE id_product IN (####); DELETE FROM `ps_search_index` WHERE id_product IN (####); DELETE FROM `ps_stock_mvt` WHERE id_product IN (####); DELETE FROM `ps_accessory` WHERE id_product_1 IN (####); DELETE FROM `ps_accessory` WHERE id_product_2 = (####); DELETE FROM `ps_product_attachment` WHERE id_product IN (#####); DELETE FROM `ps_feature_product` WHERE id_product IN (####); DELETE FROM `ps_customization_field` WHERE id_product IN (####); DELETE FROM `ps_specific_price` WHERE id_product IN (####); DELETE FROM `ps_product_attribute` WHERE id_product IN (####); DELETE FROM `ps_image` WHERE id_product IN (####); DELETE FROM `ps_image_lang` WHERE id_image IN (####); I also did a search of the numbers in the database and removed any indexed. I then inserted them back with their new product numbers and the big thing I also had to do was reset the auto increment in ps_product, I can now duplicate and create new items Can you make this more clearer, I am having the same problem but I do not know where to start. Link to comment Share on other sites More sharing options...
giftsforyounme Posted September 12, 2012 Share Posted September 12, 2012 I export each ps_ listed edit all with large or long Product ID # and import it back and reset the auto increment in ps_product. It did not work instead it remove all the products I re-do and disable all other products Link to comment Share on other sites More sharing options...
kashyyyk Posted September 15, 2012 Author Share Posted September 15, 2012 (edited) Once you remove all instances of the item with the long id, you need to search the database for that number and make sure it's gone, it maybe indexed. remove those too. Then reset the autoincrement. if you don't have many just add the product through the backoffice to see if it works. if not you may have another problem too. I found the reset auto increment through operations didn't work, I then used a query alter table abc auto_increment = 1; it won't reset to 1 but to the highest product number that is there, change table 'abc' to what your product table is Dan Edited September 16, 2012 by kashyyyk (see edit history) Link to comment Share on other sites More sharing options...
giftsforyounme Posted September 16, 2012 Share Posted September 16, 2012 What if I just want to delete all the products I added that cause this error message. I log in phpmyAdmin and change all the product ID to a lower ID number and instead the products disappear off my website but I was still getting the error message. I am willing to add the products manually, so how can I remove these products Link to comment Share on other sites More sharing options...
kashyyyk Posted September 16, 2012 Author Share Posted September 16, 2012 DELETE FROM `ps_category_product` WHERE id_product IN (####); DELETE FROM `ps_product` WHERE id_product IN (####); DELETE FROM `ps_product_lang` WHERE id_product IN (####); DELETE FROM `ps_attribute_impact` WHERE id_product IN (####); DELETE FROM `ps_product_download` WHERE id_product IN (####); DELETE FROM `ps_product_sale` WHERE id_product IN (####); DELETE FROM `ps_product_tag` WHERE id_product IN (####); DELETE FROM `ps_scene_products` WHERE id_product IN (####); DELETE FROM `ps_search_index` WHERE id_product IN (####); DELETE FROM `ps_stock_mvt` WHERE id_product IN (####); DELETE FROM `ps_accessory` WHERE id_product_1 IN (####); DELETE FROM `ps_accessory` WHERE id_product_2 = (####); DELETE FROM `ps_product_attachment` WHERE id_product IN (#####); DELETE FROM `ps_feature_product` WHERE id_product IN (####); DELETE FROM `ps_customization_field` WHERE id_product IN (####); DELETE FROM `ps_specific_price` WHERE id_product IN (####); DELETE FROM `ps_product_attribute` WHERE id_product IN (####); DELETE FROM `ps_image` WHERE id_product IN (####); DELETE FROM `ps_image_lang` WHERE id_image IN (####); this is through mysql like phpMyAdmin not through the back office, also do a backup first, put your product id where #### is. you may get an error for a table, it may just mean the product wasn't in that table. then use the search in mysql for the product ids and see if they are gone. then use the auto increment like above 1 Link to comment Share on other sites More sharing options...
Umar Akram Posted January 15, 2015 Share Posted January 15, 2015 DELETE FROM `ps_category_product` WHERE id_product IN (####);DELETE FROM `ps_product` WHERE id_product IN (####);DELETE FROM `ps_product_lang` WHERE id_product IN (####);DELETE FROM `ps_attribute_impact` WHERE id_product IN (####);DELETE FROM `ps_product_download` WHERE id_product IN (####);DELETE FROM `ps_product_sale` WHERE id_product IN (####);DELETE FROM `ps_product_tag` WHERE id_product IN (####);DELETE FROM `ps_scene_products` WHERE id_product IN (####);DELETE FROM `ps_search_index` WHERE id_product IN (####);DELETE FROM `ps_stock_mvt` WHERE id_product IN (####);DELETE FROM `ps_accessory` WHERE id_product_1 IN (####);DELETE FROM `ps_accessory` WHERE id_product_2 = (####);DELETE FROM `ps_product_attachment` WHERE id_product IN (#####);DELETE FROM `ps_feature_product` WHERE id_product IN (####);DELETE FROM `ps_customization_field` WHERE id_product IN (####);DELETE FROM `ps_specific_price` WHERE id_product IN (####);DELETE FROM `ps_product_attribute` WHERE id_product IN (####);DELETE FROM `ps_image` WHERE id_product IN (####);DELETE FROM `ps_image_lang` WHERE id_image IN (####);I am also facing the same problem with the product duplicaton and creation.Kindly help me i am so worried about that.I dn't understand how you fix this issue.kindly more elaborate this.Regards & advance thanks. Link to comment Share on other sites More sharing options...
onerealife Posted March 26, 2015 Share Posted March 26, 2015 Hey all, I've got the same problem as you guys here... I'm new to this stuff so would someone please list a detailed TUT here, so i can follow it? thanks in advance Link to comment Share on other sites More sharing options...
Recommended Posts