#2754601: Pager always returning first page restored compatibility for views_ajax_get and views_infinite_scroll, but it also causes unexpected behaviour in vanilla views for certain use cases involving AJAX, pager and exposed filters.

For example, say you have an AJAX view that displays 2 (or more) pages of results with no filters applied.

Access that view with a ?page=1 parameter so that the view starts on page 2. Now try and apply an exposed filter which reduces the total number of results pages to 1.

You'll get a blank view because the AJAX code is accepting the page parameter from $_GET and is subsequently trying to display a 2nd page that no longer exists in the results.

In other words, for an AJAX view accessed with ?page=n in the URL, subsequently filtering the number of pages to n or fewer will break it.

Comments

morbiD created an issue.

ABaier’s picture

Also occuring in core 8.4.4