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

SI: Product Grid Doesn't Allow Products to be Deleted #419

Closed WillStrohl closed 1 year ago

WillStrohl commented 1 year ago

Describe the bug

When using the Product Grid module, the products can be added without any issue. However, attempting to delete any product results in an error. On the surface, it appears that nothing happened, but an exception is being logged with each click.

Software Versions

To Reproduce

Steps to reproduce the behavior:

  1. Start with a clean instance of DNN + Hotcakes. Go through the startup wizard, and then add the sample products to the store.
  2. Login with edit permissions to the module (including admin and superuser).
  3. Add a Product Grid module to any page.
  4. Enter into the module settings and choose the Hotcakes Product Grid Settings tab.
  5. Add one or many existing products to the product grid module using the Choose Products section.
  6. Save your settings to exist.
  7. Re-enter the module settings and now navigate to the Products to Display section in the Hotcakes Product Grid Settings tab.
  8. Click the Delete link for any single product.

Expected behavior

The grid should reload and the product next to the delete link should be gone.

Actual behavior

Nothing appears to happen.

A format exception is logged but not displayed. (See the exception stack trace below.)

\Website\DesktopModules\Hotcakes\ProductGrid\Settings.ascx.cs:line 191

Screenshots

image

Error log

InnerMessage:Input string was not in a correct format.  

InnerStackTrace:  

   at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)  
   at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)  
   at Hotcakes.Modules.ProductGrid.Settings.rgProducts_OnDeleteCommand(Object sender, GridViewDeleteEventArgs e) in C:\Work\HCC-core\hcc-core\Website\DesktopModules\Hotcakes\ProductGrid\Settings.ascx.cs:line 191  
   at System.Web.UI.WebControls.GridViewDeleteEventHandler.Invoke(Object sender, GridViewDeleteEventArgs e)  
   at System.Web.UI.WebControls.GridView.HandleDelete(GridViewRow row, Int32 rowIndex)  
   at System.Web.UI.WebControls.GridView.HandleEvent(EventArgs e, Boolean causesValidation, String validationGroup)  
   at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)  
   at System.Web.UI.WebControls.GridViewRow.OnBubbleEvent(Object source, EventArgs e)  
   at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)  
   at System.Web.UI.Page.<ProcessRequestMainAsync>d__523.MoveNext()  

Additional context

Internal Support Ticket: 10459