Duplicate Entry Error When Adding Width/Size Variations In EasyStore - Question | JoomShaper

Duplicate Entry Error When Adding Width/Size Variations In EasyStore

BP

Bruce Paine

EasyStore 5 days ago

Hi Support Team,

I’ve encountered what appears to be a bug when adding additional variation values to a product in EasyStore.

Steps to reproduce:

  1. Open an existing product in the EasyStore product editor
  2. Navigate to the Variations section
  3. Under Width, add a new value (e.g. “H - Standard Wide” or even “Test”)
  4. Click Done
  5. Attempt to Save the product

Result: Save fails with the error: 23000, 1062, Duplicate entry '12-7' for key 'PRIMARY'

Additional testing:

  • Removing the added Width variation allows the product to save normally
  • The same issue occurs when adding a new Size variation (e.g. “Size 99”)
  • Adding additional Colour variations works without error

Related display issue (possibly connected): On the front-end product page, the Width variation: “Width : H+ - Standard Wide plus” is partially rendered inside a circular icon, with truncated text (“anda” / “ide”) appearing stacked inside the dot.

0
12 Answers
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 2 days ago #223044

Please check this: https://prnt.sc/T3PPYXlsoODd

When you want to add a new value, click on “Add New”, then click on the input field. You will see a list of available values — you can select an existing one from there, or add a new value if it hasn’t been added yet.

Screenshot for reference: https://prnt.sc/qg5HNIuLe4R9

Please, check now, I think you will not see any issues. I re-install the latest version of EasyStore.

Thanks,

0
BP
Bruce Paine
Accepted Answer
5 days ago #222980

Here are my site's login credentials.

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 3 days ago #223007

Hello Bruce,

I apologize for the inconvenience.

I am currently reviewing your issue. Once I have more information, I will share an update with you.

Thank you for your patience and understanding.

Best regards,

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 3 days ago #223011

The issue you are facing is due to duplicate values. I can see that these values are already added in EasyStore → Settings → Variation Library → Width.

Because of this, when you try to add the same value again under Product Variation → Width, the system shows an error.

Please select the existing value from the list instead of typing the same value again, and then click save. This applies to all existing variations.

Thanks,

0
BP
Bruce Paine
Accepted Answer
2 days ago #223033

Hi - Thanks for your help.

Just to clarify the situation:

I was adding a new value, not already assigned to the product. There shouldn't have been a duplicate.

Now I have tried adding another new value 'K - Extra Wide' to my test product "Haflinger - Hawk - sheep skin - Chestnut" (ID = 3) and then tried saving.

The following error message appeared:

Save failed with the following error: Cannot add or update a child row: a foreign key constraint fails (devcomfo_db.comf_easystore_variation_combinations, CONSTRAINT comf_easystore_variation_combinations_ibfk_2 FOREIGN KEY (product_attribute_value_id) REFERENCES comf_easystore_product_attribute_values (id) ON DELETE CASCADE ON UPDATE CASCADE)

That does not look like a message expected for a normal end user experience.

I wonder if there might be data corruption somewhere.

What do you think?

0
BP
Bruce Paine
Accepted Answer
2 days ago #223035

Here is another observation.

After seeing the message explained above, I did the following:

  1. closed the Product record.
  2. Re-opened the product and found that the new Width variation 'K - extra-wide' has been added successfully.
  3. Saved the Product record - this time without error.

A second colour variation has also saved.

The error message only appeared when saving the Product record AFTER using the "Add another variation" button.

0
BP
Bruce Paine
Accepted Answer
2 days ago #223037

Also to clarify further...

I want one variation named "Width" And different values possible 'Narrow', 'Standard Wide', 'Extra Wide', 'Extra-extra Wide' etc.

Just like with "Sizes", I want one Attribute with multiple values.

0
BP
Bruce Paine
Accepted Answer
2 days ago #223038

This is difficult to explain.

I will check the user instructions again, but I don't think I'm doing anything wrong.

0
BP
Bruce Paine
Accepted Answer
2 days ago #223039

I have created some screenshots to illustrate the problem

They show:

  1. Editing Sizes (adding)
  2. Editing Widths (adding)
  3. Product variations (after adding)
  4. The error message on save
  5. The product record re-opened and the new widths visible.

The error message does not seem to affect adding the new Variations.

I have also tested this adding Size 46. Same error message and the new size is created.

I hope this helps.

0
BP
Bruce Paine
Accepted Answer
2 days ago #223042

Also, thank you for alerting me to the variations library. I have reviewed them and I understand the re-use of existing values.

However, my earlier confusion was because those existing values were not shown in the Product Variation options editor.

But now, when I add variations those existing values are now appearing.

I am uncertain why they are working now.

0
BP
Bruce Paine
Accepted Answer
2 days ago #223107

Thanks for your help.

My initial misunderstanding was trying to add new variations through the Product entry page.

I now understand how to use the Variations library editor. It took me a while to realise that you must click on the 'Save' button after adding new values and editing existing ones. I have become used to other user interfaces which save automatically.

Also, for clarification, I have a good understanding now of the data structure (tables and key relationships) behind the Variations Library and how it all relates to products. It all makes sense.

I think I have things under control now.

Thanks again.

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 1 day ago #223125

Hi Bruce,

Thank you for your update, and we’re glad to hear everything is now making sense and under control.

It’s also great to hear that you now have a clear understanding of how the Variations Library structure and its relationship with products works.

If you run into anything else or need further clarification in the future, feel free to reach out anytime.

Thanks again for your feedback and support.

Best regards,

0