Unable to edit the display order for multiple product specification attributes

2 weeks ago
Hello,
I'm encountering an error when trying to edit more than a dozen product specification attributes for a product. All is well for the first 10 or 11 attributes that I edit but once I reach anymore than that I receive an "error happened" and the update fails. I was able to narrow it down to the _CreateOrUpdate.SpecificationAttributes.cshtml file (calls the update function) and the ProductSpecAttrUpdate function in the Nop.Web/Administration/Controllers/ProductController.cs file. I don't know if this has happened to anyone else or if there is already a solution for it but I would like to know how I can fix this issue. Thanks for your help!

Btw, my nopCommerce version is 3.9.
1 week ago
Hello,

Unfortunately, unless we have the error details we cannot really help you. Could you follow this article and share the error details with us so we can try and figure out what issue are you having.

Regards,
Anton
1 week ago
Thanks for your reply, Anton.

The FullMessage details in the system log are as follows:

System.NullReferenceException: Object reference not set to an instance of an object.    
at Nop.Admin.Controllers.ProductController.<ProductSpecAttrList>b__100_0(ProductSpecificationAttribute x)    
at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()    
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)    
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)    
at Nop.Admin.Controllers.ProductController.ProductSpecAttrList(DataSourceRequest command, Int32 productId)    
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)    
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult)    
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()    
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult)    
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d()    
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()    
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()    
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()    
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()    
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()    
at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f()    
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass33.<BeginInvokeActionMethodWithFilters>b__32(IAsyncResult asyncResult)    
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult)    
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End()    
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult)    
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<>c__DisplayClass2b.<BeginInvokeAction>b__1c()    
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult)
1 week ago
Anton,

If there is anything else that I can provide just let me know. I'd really like to see this fixed.
1 week ago
Re: "Object reference not set to an instance of an object"
This message thrown when you try to perform an action on a object which is not initialized. It's a very common error message. Try to debug if you have source code.
1 week ago
Thanks. I'll give it a try and see what I find out.