sgjsakura / AspNetCore

ASP.NET Core Extension Library
Apache License 2.0
162 stars 26 forks source link

Null source in version 3.0.1 #39

Closed Moosapoor closed 5 years ago

Moosapoor commented 5 years ago

Hi, I have a problem when I upgraded my "Sakura.AspNetCore.Mvc.PagedList" package to version 3.0.1:

InvalidOperationException: The specified paging source came from the 'source' cannot be null Sakura.AspNetCore.Mvc.TagHelpers.PagerTagHelper.GetPagingInfoFromSource(out int currentPage, out int totalPage) Sakura.AspNetCore.Mvc.TagHelpers.PagerTagHelper.GetPagingInfo(TagHelperContext context, out int currentPage, out int totalPage) Sakura.AspNetCore.Mvc.TagHelpers.PagerTagHelper.Process(TagHelperContext context, TagHelperOutput output)

I didn't have this problem in version 3.0.0 but in that version I had to add total-page and current-page to the tag helper manually as follow: <pager total-page="@Model.TotalPage" current-page="@Model.PageIndex" />

Thanks,

sgjsakura commented 5 years ago

Hi, thank you for your feedback, unfortunately I cannot reproduce your issue. Could you provide a minimum project for this problem?

Best wishes,

ian-cameron commented 5 years ago

SakuraPagedList301.zip

I'm not the original poster of this issue, but had the same problem. Here is a minimum project with the problem. Thanks!

sgjsakura commented 5 years ago

Hi, this problem is fixed in the lastest version 3.0.2. I'm closing this issue and please feel free to reopen it if you meet any new problem.