When using a pager on a view and manually going to a page with a higher page number than the maximum page I expect views to return an empty page or some kind of error. Instead views currently ignores the page number and shows me the first page. This makes it very hard to in some situations figure out that the page number requested doesn't exist.

I would suggest to change this so that the page number is never ignored and if it's too high then an empty page is shown.

I attach the simplest patch possible to solve this - a nicer patch that doesn't waste a database query might be better.

CommentFileSizeAuthor
views_remove_pager_total_check.patch611 bytesvoxpelli
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Letharion’s picture

Assigned: Unassigned » merlinofchaos
merlinofchaos’s picture

Status: Needs review » Needs work

Views is supposed to conform to core's handling in this case. Actually it doesn't, but neither does yours.

Core's handling shows the last page if you go too high. So that's what we should do as well.

esmerel’s picture

Assigned: merlinofchaos » voxpelli
MustangGB’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)