Close

Profile: miroz

Avatar

User posts

Bugs
11 years ago

miroz wrote:

I did some research and found that categories that produce errors have only one product in it and this product has ProductVariant.SpecialPrice set.
If I add products that aren't on a


Continuing:
If I add products that aren't on action to this category, it displays fine.
Can you reproduce this error?

Bugs
11 years ago

I'm using NOPCommerce 3.0 with ultimate plugin collection trial 3.0.52.7900. Error is in PriceRange Ajax Filter.
When I open some categories I get this error:


File=NOP.Core/Caching/Extensions.cs
On line: var result = acquire();
Message=The cast to value type 'Decimal' failed because the materialized value is null. Either the result type's generic parameter or the query must use a nullable type.
Source=System.Data.Entity
StackTrace:
       at System.Data.Common.Internal.Materialization.Shaper.ErrorHandlingValueReader`1.GetValue(DbDataReader reader, Int32 ordinal)
       at System.Data.Common.Internal.Materialization.Shaper.GetColumnValueWithErrorHandling[TColumn](Int32 ordinal)
       at lambda_method(Closure , Shaper )
       at System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper)
       at System.Data.Common.Internal.Materialization.Shaper`1.SimpleEnumerator.MoveNext()
       at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
       at System.Data.Objects.ELinq.ObjectQueryProvider.<GetElementFunction>b__3[TResult](IEnumerable`1 sequence)
       at System.Data.Objects.ELinq.ObjectQueryProvider.ExecuteSingle[TResult](IEnumerable`1 query, Expression queryRoot)
       at System.Data.Objects.ELinq.ObjectQueryProvider.System.Linq.IQueryProvider.Execute[S](Expression expression)
       at System.Data.Entity.Internal.Linq.DbQueryProvider.Execute[TResult](Expression expression)
       at System.Linq.Queryable.Min[TSource,TResult](IQueryable`1 source, Expression`1 selector)
       at SevenSpikes.Nop.AjaxFilters.Services.PriceCalculationServiceNopAjaxFilters. (Int32  , Int32  , PriceRangeFilterDto  )
       at SevenSpikes.Nop.AjaxFilters.Services.PriceCalculationServiceNopAjaxFilters.GetPriceRangeFilterDto(Int32 categoryId, Int32 manufacturerId)
       at SevenSpikes.Nop.AjaxFilters.Controllers.PriceRangeFilterSlider7SpikesController. . ()
       at Nop.Core.Caching.CacheExtensions.Get[T](ICacheManager cacheManager, String key, Int32 cacheTime, Func`1 acquire) in c:\Inpro\Projects2013\nopCommerce3\Libraries\Nop.Core\Caching\Extensions.cs:line 23
       at Nop.Core.Caching.CacheExtensions.Get[T](ICacheManager cacheManager, String key, Func`1 acquire) in c:\Inpro\Projects2013\nopCommerce3\Libraries\Nop.Core\Caching\Extensions.cs:line 12
       at SevenSpikes.Nop.AjaxFilters.Controllers.PriceRangeFilterSlider7SpikesController. (Nullable`1  , Nullable`1  , String  )
       at SevenSpikes.Nop.AjaxFilters.Controllers.PriceRangeFilterSlider7SpikesController.GetPriceRangeFilter(Nullable`1 categoryId, Nullable`1 manufacturerId, String price)
       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.<>c__DisplayClass42.<BeginInvokeSynchronousActionMethod>b__41()
       at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
       at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass37.<>c__DisplayClass39.<BeginInvokeActionMethodWithFilters>b__33()
       at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass4f.<InvokeActionMethodFilterAsynchronously>b__49()


I did some research and found that categories that produce errors have only one product in it and this product has ProductVariant.SpecialPrice set.
If I add products that aren't on a