Exception when placing order in EfRepository.cs - this._context.SaveChanges();

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 лет назад
I'm getting a strange exception when placing an order with NopCommerce 3.90.

Line 81 of EfRepository.cs:
this._context.SaveChanges();

This exception is being thrown:

"The operation failed: The relationship could not be changed because one or more of the foreign-key properties is non-nullable. When a change is made to a relationship, the related foreign-key property is set to a null value. If the foreign-key does not support null values, a new relationship must be defined, the foreign-key property must be assigned another non-null value, or the unrelated object must be deleted."

What's strange is only a select few customer accounts trigger this exception. Most are fine.

Spent hours trying to find some kind of pattern but keep coming up empty. Does anyone have any idea? Would really appreciate any kind of advice.

This triggers when completing an order. I'm being sent here from OpcConfirmOrder() in CheckoutController.cs
7 лет назад
Update.


This only happens when the customer has items in their wishlist. Using a custom theme and the default clean both behave the same.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.