Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when saving product with more than one variant with same sku #399

Closed
oadslug opened this issue Jun 26, 2018 · 1 comment
Closed

Error when saving product with more than one variant with same sku #399

oadslug opened this issue Jun 26, 2018 · 1 comment
Labels

Comments

@oadslug
Copy link

oadslug commented Jun 26, 2018

Description

Received an error when attempting to save a product with more than one variant with the same sku (as opposed to just a 'Couldn't save product' CMS warning).

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '99111' for key 'craft_commerce_variants_sku_unq_idx'
The SQL being executed was: INSERT INTO `craft_commerce_variants` (`id`, `productId`, `sku`, `price`, `width`, `height`, `length`, `weight`, `minQty`, `maxQty`, `stock`, `isDefault`, `sortOrder`, `hasUnlimitedStock`, `dateCreated`, `uid`, `dateUpdated`) VALUES (1390, 1388, '99111', '25', '0', '0', '0', '0', NULL, NULL, 0, 0, 2, 1, '2018-06-26 04:00:30', '0e79b813-a08a-497e-8f82-fd9e242be007', '2018-06-26 04:00:30')

Additional info

  • Craft version: Craft CMS 3.0.12
  • PHP version: 7.0.13
  • Database driver & version: MySQL 5.6.34
  • Plugins & versions: Commerce 2.0.0-beta.5
@lukeholder lukeholder added the bug label Jun 26, 2018
@lukeholder
Copy link
Member

Thanks fixed for the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants