This is a migrated thread and some comments may be shown as answers.

Paging issue after upgrade to v2013.2.716

9 Answers 124 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Joshua
Top achievements
Rank 1
Joshua asked on 08 Aug 2013, 06:20 PM
I seem to have hit an issue with paging after upgrading to the latest version of kendo.

It happens with ajax and server binding.  It appears that the filter data for the data source passes undefined values, which results in a 500 error on the server when it tries to bind to the filter values.  If I apply a filter, paging starts to work again.

(server binding example)

Grid Code
 @(Html.Kendo()
                .Grid(Model.Items)
                .Name("operatorList")
                .DataSource(ds => ds.Server())
                .Columns(columns =>
                    {
                        columns.Bound(c => c.Name);
                    })
                    .Filterable()
                    .Pageable())

Action
 public ActionResult Index()
        {
            var vm = new LookUpIndexViewModel<T>();
            vm.Recent = GetRecentlyActive();
            vm.Items = All();
            return View(vm);
        }

Url Requested (when paging)
http://localhost/browse/operator?operatorList-sort=&operatorList-page=2&operatorList-pageSize=15&operatorList-group=&operatorList-filter=undefined~undefined~undefined

Scripts Included (in this order)
<script src="/scripts/kendo.all.js"></script>
<script src="/scripts/kendo.aspnetmvc.js"></script>
doulbe checked versions also both say: v2013.2.716

Stack Trace
[NullReferenceException: Object reference not set to an instance of an object.]
Kendo.Mvc.Infrastructure.Implementation.FilterNodeVisitor.Visit(PropertyNode propertyNode) +60
Kendo.Mvc.UI.DataSourceRequestModelBinder.BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) +465
Kendo.Mvc.UI.Grid`1.ProcessDataSource() +395
Kendo.Mvc.UI.Grid`1.WriteHtml(HtmlTextWriter writer) +1145
Kendo.Mvc.UI.WidgetBase.ToHtmlString() +105
Kendo.Mvc.UI.Fluent.WidgetBuilderBase`2.ToHtmlString() +19
System.Web.WebPages.WebPageExecutingBase.WriteTo(TextWriter writer, Object content) +57
CtrlDev.Wdb.Web.Areas.Browse.Views.Operator.Index.Execute() in f:\Projects\CtrlDev.WDB\CtrlDev.Wdb.Web\Areas\Browse\areas\browse\views\operator\Index.cshtml:26
System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +279
System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +124
System.Web.WebPages.StartPage.ExecutePageHierarchy() +142
System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +103
RazorGenerator.Mvc.PrecompiledMvcView.Render(ViewContext viewContext, TextWriter writer) +951
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +377
System.Web.Mvc.<>c__DisplayClass1a.<InvokeActionResultWithFilters>b__17() +32
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +236
System.Web.Mvc.<>c__DisplayClass1d.<BeginExecuteCore>b__18(IAsyncResult asyncResult) +28
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__3(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +15
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1725
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +560

Found this question on SO, not sure if it is related, but it sounds like it.

Any help would be greatly appreciated!

Thanks!
Josh

9 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 09 Aug 2013, 08:23 AM
Hi Joshua,

 This is a known regression which is fixed in the latest internal build.

Regards,
Atanas Korchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Joshua
Top achievements
Rank 1
answered on 09 Aug 2013, 02:48 PM
Hi Atanas, 
Thanks for the update, I upgraded our project to the internal build, and all ajax bound/paged grids are working as expected now.  However, the server bound/paged ones still have the same issue, that said the url they request now only includes one undefined filter field now:

?operatorList-sort=&operatorList-page=2&operatorList-pageSize=15&operatorList-group=&operatorList-filter=undefined

Regards,
Josh
0
Atanas Korchev
Telerik team
answered on 12 Aug 2013, 12:53 PM
Hi Josh,

Could it be due to browser caching? Also make sure that all files have been updated - the JavaScript and dll. Having this problem means that the upgrade wasn't complete for some reason.

Regards,
Atanas Korchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Joshua
Top achievements
Rank 1
answered on 12 Aug 2013, 06:59 PM
Hey Atanas, 
Thanks for getting back to me!  After ruling out all browser caching issues, I started suspecting something in our JS was causing the issues. Turns out we had some code that extended the Array prototype, and Kendo seems to not like that, at all!

We have 5 or so functions that were added, and having any one of them on the page caused the paging issue. We can work around that easily by removing the prototype extensions, which I want to do anyway.  Odd thing is we use ES5 Shim, and it seems to work fine.

Anyway, you can reproduce my issue by creating a new Kendo UI MVC Project in VS, creating a server bound grid, and adding this to the top of the page:

    @*Won't work with this included*@
<script>
    Array.prototype.max = function () {
        return Math.max.apply({}, this);
    };
</script>

I have a sample project together if you want me to send it over, just let me know!
Thanks,
Josh

0
Atanas Korchev
Telerik team
answered on 13 Aug 2013, 09:03 AM
Hi Joshua,

 It seems that extending the Array prototype breaks the $.isEmptyObject function (http://jsbin.com/ubeqit/1/edit). This in turn breaks some filtering code in the data source hence the problem. 

Regards,
Atanas Korchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Joshua
Top achievements
Rank 1
answered on 14 Aug 2013, 12:00 AM
That is an interesting discovery, I will keep it in mind!  I removed the prototype extensions and everything is working as expected now.  
Thanks for your help :)
-Josh
0
Joar
Top achievements
Rank 1
answered on 19 Sep 2013, 06:50 AM
We're experiencing a very similar issue after we clear a column filter during the Ajax call to the MVC controller action and needs a supported build as the internal builds are not recommended for production.

I've verified that the internal build fix this issue, and I want to avoid downgrading to the previous version because we also want to use Typescript 0.9. Do you have any time frame for when you'll ship a fix for this issue?

Thanks,
Joar Øyen
0
Atanas Korchev
Telerik team
answered on 19 Sep 2013, 07:21 AM
Hello Joar,

 All internal builds are fully supported and we recommend them for production. They contain only bug fixes for issues discovered in the latest official release. Other than that we have recently released a service pack release.

Regards,
Atanas Korchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Joar
Top achievements
Rank 1
answered on 19 Sep 2013, 07:33 AM
Hi Atanas,

Thanks for the feedback, and I'm going to update to the latest release. I didn't have any updates in Telerik Control Panel yesterday and pretty sure I didn't see anything this morning either but now I'm able to update to version 2013.2.918.

The page for your internal builds do however state that "intended for development only" and "not recommended for production purposes" and that's why I was hesitant to use the 2013.2.912 version from this page:
http://www.telerik.com/account/your-products/internal-builds.aspx?type=2&skucid=45

- Joar
Tags
Grid
Asked by
Joshua
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Joshua
Top achievements
Rank 1
Joar
Top achievements
Rank 1
Share this question
or