Close

BUG: Error in RetrieveProductRibbons when categoryPageIds array is empty

petemitch
8 years ago
#9895 Quote
Avatar
  • 12
Hello.
Some of our product ribbons aren't displaying.  After a bit of investigation of narrowed it down to the Ajax request to RetrieveProductRibbons being passed an empty array.  To reproduce, go to this page on your demo site:http://demos.nop-templates.com/apple-icam.  Open Chrome developer tools, click the Network tab and filter the request types by XHR and reload the page. You should see the RetrieveProductRibbons request getting redirected to the custom errors page.

This image shows the error as I see it when testing on localhost: http://imageshack.com/a/img538/5283/xPWZnB.png

I also get this error in the error log:
System.ArgumentNullException: Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.Distinct[TSource](IEnumerable`1 source)
   at SevenSpikes.Nop.Plugins.ProductRibbons.Controllers.ProductRibbonsController.RetrieveProductRibbons(Int32[] categoryPageIds, Int32 productPageId)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
   ...

Regards, Pete.
hristian.dimov
8 years ago
#9919 Quote
Avatar
  • Moderator
  • 386
petemitch wrote:
Hello.
Some of our product ribbons aren't displaying.  After a bit of investigation of narrowed it down to the Ajax request to RetrieveProductRibbons being passed an empty array.  To reproduce, go to this page on your demo site:http://demos.nop-templates.com/apple-icam.  Open Chrome developer tools, click the Network tab and filter the request types by XHR and reload the page. You should see the RetrieveProductRibbons request getting redirected to the custom errors page.

This image shows the error as I see it when testing on localhost: http://imageshack.com/a/img538/5283/xPWZnB.png

I also get this error in the error log:
System.ArgumentNullException: Value cannot be null.
Parameter name: source
   at System.Linq.Enumerable.Distinct[TSource](IEnumerable`1 source)
   at SevenSpikes.Nop.Plugins.ProductRibbons.Controllers.ProductRibbonsController.RetrieveProductRibbons(Int32[] categoryPageIds, Int32 productPageId)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState)
   ...

Regards, Pete.


Hi,

It's fixed now. Please update your plugin to the latest version.

Thank you for reporting this!
Regards,
Hristian Dimov
Nop-Templates.com
petemitch
8 years ago
#9922 Quote
Avatar
  • 12
I've applied the update and that's fixed it.  Thanks for the quick turnaround.

Regards, Pete.