We are upgraded from MVC 5 to MVC-Core and using now your core components (latest version).
In our AutoComplete box, we get now a NullReference exception, without changing anything at our codebase.
Generated Script from Kendo MVC-Core:
kendo.syncReady(function(){jQuery("#txtSearchForLink").kendoAutoComplete({"select":insertLink.searchResultSelected,"dataTextField":"Text","filter":"Contains","footerTemplate":jQuery('#searchResultFooterTemplate').html(),"minLength":0,"placeholder":"Suchen","template":jQuery('#searchResultTemplate').html(),"dataSource":{"type":"aspnetmvc-ajax","transport":{"read":{"url":"/Orphy/Search/GetQuickSearchData","data":insertLink.onAdditionalData}},"serverFiltering":true,"serverGrouping":true,"sort":[{"field":"Weight","dir":"desc"}],"group":[{"field":"GroupName","dir":"desc"}],"filter":[],"schema":{"data":"Data","model":{"id":"Id"}}}});});
Debugging:
-> context.Count == 0 -> so Null will returned
-> Here you access the property Memeber of Null ... ?
Call Stack:
System.NullReferenceException: Object reference not set to an instance of an object.
at Kendo.Mvc.Infrastructure.Implementation.FilterNodeVisitor.Visit(PropertyNode propertyNode)
at Kendo.Mvc.Infrastructure.Implementation.PropertyNode.Accept(IFilterNodeVisitor visitor)
at Kendo.Mvc.Infrastructure.FilterDescriptorFactory.Create(String input)
at Kendo.Mvc.UI.DataSourceRequestModelBinder.<>c__DisplayClass2_0.<CreateDataSourceRequest>b__3(String filter)
at Kendo.Mvc.UI.DataSourceRequestModelBinder.TryGetValue[T](ModelMetadata modelMetadata, IValueProvider valueProvider, String modelName, String key, Action`1 action)
at Kendo.Mvc.UI.DataSourceRequestModelBinder.CreateDataSourceRequest(ModelMetadata modelMetadata, IValueProvider valueProvider, String modelName)
at Kendo.Mvc.UI.DataSourceRequestModelBinder.BindModelAsync(ModelBindingContext bindingContext)
at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinder.<BindModelAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.<BindModelAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<<CreateBinderDelegate>g__Bind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextExceptionFilterAsync>d__24.MoveNext() System.NullReferenceException: Object reference not set to an instance of an object.
at Kendo.Mvc.Infrastructure.Implementation.FilterNodeVisitor.Visit(PropertyNode propertyNode)
at Kendo.Mvc.Infrastructure.Implementation.PropertyNode.Accept(IFilterNodeVisitor visitor)
at Kendo.Mvc.Infrastructure.FilterDescriptorFactory.Create(String input)
at Kendo.Mvc.UI.DataSourceRequestModelBinder.<>c__DisplayClass2_0.<CreateDataSourceRequest>b__3(String filter)
at Kendo.Mvc.UI.DataSourceRequestModelBinder.TryGetValue[T](ModelMetadata modelMetadata, IValueProvider valueProvider, String modelName, String key, Action`1 action)
at Kendo.Mvc.UI.DataSourceRequestModelBinder.CreateDataSourceRequest(ModelMetadata modelMetadata, IValueProvider valueProvider, String modelName)
at Kendo.Mvc.UI.DataSourceRequestModelBinder.BindModelAsync(ModelBindingContext bindingContext)
at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BinderTypeModelBinder.<BindModelAsync>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.ModelBinding.ParameterBinder.<BindModelAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerBinderDelegateProvider.<>c__DisplayClass0_0.<<CreateBinderDelegate>g__Bind|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ControllerActionInvoker.<InvokeInnerFilterAsync>d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.AspNetCore.Mvc.Internal.ResourceInvoker.<InvokeNextExceptionFilterAsync>d__24.MoveNext()
Thanks for helping me.
Cyril