-
Notifications
You must be signed in to change notification settings - Fork 53
Description
This is an intermittent problem, observed by us and our clients, but reproduction steps are still unknown to us. The issue manifests with an empty grid in the images blade, even though images exist for a given item. Here's an example:

We've discovered that this is a local issue, happening when there is a ui-grid on the blade with pagination enabled (ui-grid-pagination) and the browser somehow saves an empty object as pagination state for that blade. Here's an example of such an entry in the page's local storage:

The empty pagination state object results in paginationCurrentPage and paginationPageSize becoming undefined when pagination state is restored. Next, these undefined values mess up calculations in pagination processing where the final slice() yields empty array and thus the grid displays no results.
This is what we've been able to figure out so far, but still don't know how the empty pagination state object ended up in page's local storage in the first place. Normally this is not happening when pagination is enabled, pagination parameters paginationCurrentPage and paginationPageSize are stored as expected, but every now and then this process is distorted. One thing that comes to mind is that the code unexpectedly enters this branch when saving pagination state, but I have no idea how.