Hello,
After updating to Kentico 12 SP (at least it seems that's when it started), I'm no longer able to create new SKUs or update existing SKUs.
The message I get is An error occurred when saving data. Please see event log for more details.
After checking the Event Log, I can see that the error is:
Query:
UPDATE COM_SKU SET [SKULastModified] = @SKULastModified, [SKUBrandID] = @SKUBrandID, [SKUCollectionID] = @SKUCollectionID
WHERE [SKUID] = @SKUID
Caused exception:
The UPDATE statement conflicted with the FOREIGN KEY constraint "FK_COM_SKU_COM_Brand". The conflict occurred in database "Kentico", table "dbo.COM_Brand", column 'BrandID'.
The statement has been terminated.
I get the same Exception for the INSERT
statement, when adding a new SKU.
The next thing I've tried was temporarily removing the constraint for Brands, but then I get the same exception for Collections:
Caused exception:
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_COM_SKU_SKUCollectionID_COM_Collection". The conflict occurred in database "Kentico", table "dbo.COM_Collection", column 'CollectionID'.
The statement has been terminated.
I'm not even using Brands or Collections, but even when creating and selecting a Brand, I still get the same exception.
I'm currently running the hotfix version 34 and the issue happens on my local dev machine as well as our test app in Azure.
Thanks,
Andy