Jump to content

Error while duplicating product


Recommended Posts

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-00
00: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 by denkbeter (see edit history)
Link to comment
Share on other sites

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

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

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 by denkbeter (see edit history)
Link to comment
Share on other sites

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

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 by denkbeter (see edit history)
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...