HotcakesCommerce / hotcakes-commerce-core

The core of the e-commerce part of the overall solution. This is an ecommerce shopping cart solution built on top of the DNN (DotNetNuke) CMS. Anyone can do commerce online now!
https://mmmcommerce.com
MIT License
68 stars 55 forks source link

Exception occurs when editing a Product Type Property that is associated with a product. #378

Closed jcmrva closed 1 year ago

jcmrva commented 2 years ago
[NullReferenceException: Object reference not set to an instance of an object.]
   Hotcakes.Modules.Core.Admin.Catalog.ProductTypePropertiesEdit.get_ProductPropertyChoiceId() +52
   Hotcakes.Modules.Core.Admin.Catalog.ProductTypePropertiesEdit.<btnUpdateChoice_Click>b__8(ProductPropertyChoice y) +13
   System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source, Func`2 predicate) +173
   Hotcakes.Modules.Core.Admin.Catalog.ProductTypePropertiesEdit.btnUpdateChoice_Click(Object sender, EventArgs e) +223
   System.Web.UI.WebControls.LinkButton.OnClick(EventArgs e) +136
   System.Web.UI.WebControls.LinkButton.RaisePostBackEvent(String eventArgument) +147
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5027

Software Versions

To Reproduce

Steps to reproduce the behavior:

  1. Go to Edit Product Type Property
  2. Edit an option (choice name & display name) that that has been set on a product
  3. Click Update

image

I was able to edit a similar newly added option without error. Also, other choices were editable. Possibly an issue with that specific name or removing the hyphen?

Workaround

Update via SQL directly in hcc_ProductPropertyChoiceTranslations and hcc_ProductPropertyChoice

WillStrohl commented 2 years ago

Are these the specific options that cause this error, or are those option names different?

jcmrva commented 2 years ago

The option in the screenshot is the one we tried to edit.

erw13n commented 2 years ago

Issue confirmed, able to reproduce it. Happen when editing multiple choice type properties.