Developer forum

Forum » Ecommerce - Standard features » Error deleting a variant

Error deleting a variant

Mario Santos
Reply

Hello,

 

I'm getting the following when trying to delete a variant:

The DELETE statement conflicted with the REFERENCE constraint "EcomProductCategoryFieldValue$ProductForeignKey". The conflict occurred in database "dev.fasteddie.dw-demo.com", table "dbo.EcomProductCategoryFieldValue".
The statement has been terminated.

Does anyone knows what could be causing this?

DW version: 8.8.1.15.

 

Thanks, Mário


Replies

 
Nicolai Pedersen
Reply

Send to QA for investigation

 
Oleg Rodionov
Reply

Hi,

I've tested our test environment based on 8.8.1.15 but not able to catch the issue - the deleting of product variant combinations (extended or don't)/product variant group, variant and/or variant group in its definition (when the variants are still used in existing extended variant combinations of the product) is performed properly, without an exception. I've tried various initial condition: test ProductCategories is applied for product top group/its subgroups, inherited/isn't to the subgroups and values of the fields are updated/not updated. Besides, I've tried to use the category fields can/cannot be changed within product variant (via appropriate option in MC-Ecom-AC-Fields) and localization of the variants/product fields to second language . OK on deleting in all cases.

BR, Oleg  QA 

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Oleg,

I just tried this on a local site using a backup of the database from production. When I create a new variant, and delete it, it works. When I create a variant, open it to make it extended, save it and then delete it it also works. However,  when I create a variant, open it to make it extended, change some product category field values, then save it and then delete it, it breaks (only this last action seems to add records to EcomProductCategoryFieldValue). I turned on the SQL Profiler and at some point I can see it's deleting from EcomProductCategoryFieldValue where productID = '1234" and VariantID = ''. That surprises me a bit as that seems to delete the fields for the container product and not the actual variant (since VariantID is empty).

We have some fields that are readonly, and some other that inherit. Could that have something to do with it?

I can supply a backup of the database; it's over 40GB so I have some cleansing to do first ;-)

Thanks,

Imar

 
Oleg Rodionov
Reply

Hi Imar,

Since it's issue of the specific solution, please, refer to DW technical support service to follow our process: Ticket-new investigation(public site to defect solution)-research by developer-TFS to fix a bug found.

BR, Oleg QA

 
Nicolai Pedersen
Reply

Hi Imar

Handed over this one to the Danish QA team for investigation first.

Nicolai

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply
This post has been marked as an answer

Hi Mario and Imar

Unfortunately you are quite right. There is a problem with the variants when changing EcomProductCategoryFieldValue

We have created bugnumber #26362 and will correct this a soon as possible

Kind Regards
Dynamicweb Support
Kristian Kirkholt

Votes for this answer: 1
 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Excellent, thanks all for looking into this so quickly!

Imar

 
Mario Santos
Reply

Thank you all!

BR, Mário

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Imar and Mario

The Problem #26362 has been corrected in version 8.9
I expect this to be released later today

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Kristian,

Great, thank you. Any chance this can be merged into 8.8.1.x as well?

Imar

 

You must be logged in to post in the forum