denkbeter Posted July 13, 2016 Share Posted July 13, 2016 (edited) Hello, I am having a problem that i am not able to solve. When i duplicate a product i get the following error: An error occurred while creating an object. In debug mode i get this error: Duplicate entry '62-0-0-0-0000-00-00 00:00:00-0000-00-0000:00:00-1-0-0-0-0-2-1' for key 'id_product_2 I am also having some blank tags which i think have something to do with this error because they started at the same time. I have hidden the blank tags in front office but the real issue isn't solved. I hope someone can help me with this. Thanks very much in advance! Edited July 13, 2016 by denkbeter (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted July 15, 2016 Share Posted July 15, 2016 When you create a product it has entries in ps_product, ps_product_shop, ps_product_lang and ps_category_product. My gut feeling is that you have products that are present in some of those tables (or maybe even other tables) but not in others. Link to comment Share on other sites More sharing options...
denkbeter Posted July 15, 2016 Author Share Posted July 15, 2016 Thank you for your reply. Any tips how to find out what is actually wrong or how to solve this? Link to comment Share on other sites More sharing options...
musicmaster Posted July 15, 2016 Share Posted July 15, 2016 Studying the database... Link to comment Share on other sites More sharing options...
denkbeter Posted July 15, 2016 Author Share Posted July 15, 2016 Ok so i compared ps_product, ps_product_shop, ps_product_lang and ps_category_product, they have al the same product id's in them, no abnormalities. Any other ideas? Link to comment Share on other sites More sharing options...
musicmaster Posted July 15, 2016 Share Posted July 15, 2016 Look, you have this "Duplicate entry '62-0-0-0-0000-00-00 00:00:00-0000-00-00 00:00:00-1-0-0-0-0-2-1' for key 'id_product_2" error. It concerns a specific table. So you should be able to tell us for which table the error is, what index gives the problem and whether this product id (probably 62) already exists in this table, whether that also applies to the other parts of and in other tables. That is the kind of analysis that will help you forward. Very likely it is the ps_specific_prices table... Link to comment Share on other sites More sharing options...
denkbeter Posted July 16, 2016 Author Share Posted July 16, 2016 I don't have a ps_specific_prices table, is that a problem? I also don't have a product id 62 yet, it goes up to 57. I really looked carefully in the tables you mentioned and some others but i can not find anything out of the ordinarry. Link to comment Share on other sites More sharing options...
denkbeter Posted July 16, 2016 Author Share Posted July 16, 2016 (edited) Ok i found the source of the problem. I removed all product attributes in backoffice (also ps_product_attribute & product_attribute_combination is empty) and now all products duplicate without any issue. But a s soon as i add a attribute the error is there again. I need these attribute's so do you have any idea what is wrong? Edited July 16, 2016 by denkbeter (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted July 16, 2016 Share Posted July 16, 2016 No, you did not find the problem. Emptying whole tables shows a love for big gestures so that you don't have to bother about the details. When the adding of a record is blocked you should look into that table, find out which row is blocking the entry, and find out why it is there. That is more work, but it is the only way. Link to comment Share on other sites More sharing options...
denkbeter Posted July 16, 2016 Author Share Posted July 16, 2016 (edited) No, you did not find the problem. Emptying whole tables shows a love for big gestures so that you don't have to bother about the details. When the adding of a record is blocked you should look into that table, find out which row is blocking the entry, and find out why it is there. That is more work, but it is the only way. It's not a love for big gestures, i restored a backup afterwards, its just that i now know where to look. Besides i only have about 20 products and 2 atributes at the moment so there aint nothing like a big gesture to begin with. I am still learning and i don't have a clue what to look for because all tables have the same amount of entries: id_product 9 to 60, nothing seems odd. Really appriciate your help btw. Edited July 16, 2016 by denkbeter (see edit history) Link to comment Share on other sites More sharing options...
musicmaster Posted July 16, 2016 Share Posted July 16, 2016 One option is that for some reason some table doesn't have the right index. For that reason you could compare the index with that of a fresh installation of the same version. Link to comment Share on other sites More sharing options...
denkbeter Posted July 16, 2016 Author Share Posted July 16, 2016 One option is that for some reason some table doesn't have the right index. For that reason you could compare the index with that of a fresh installation of the same version. What do you mean by index? index.php? Link to comment Share on other sites More sharing options...
musicmaster Posted July 17, 2016 Share Posted July 17, 2016 If you really don't know what database indexes are you have a very big problem, as they are causing your errors. Link to comment Share on other sites More sharing options...
denkbeter Posted July 17, 2016 Author Share Posted July 17, 2016 If you really don't know what database indexes are you have a very big problem, as they are causing your errors. Thank you. I know what database indexes are but never really had to work with them before. I will take a look at it. 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