Skip to content

Pagination doesn't redirect to error page, shows last page instead. #1887

@manuelmoreale

Description

@manuelmoreale

Describe the bug
The current pagination, instead of returning an error page when trying to visit a page number that doesn't exist (for example visiting page:50 in a collection that has only 10 pages) it's returning the last page of the pagination.

To Reproduce
Steps to reproduce the behavior:

  1. In the starterkit homepage template, add a paginate() in the foreach loop. For example foreach (page('photography')->children()->listed()->paginate(2)
  2. Try open a page with a stupidly high page number

Expected behavior
You should be redirected to the error page.

Screenshots
screenshot_2019-06-28_at_12 27 45

Kirby Version
This is happening in the current 3.2.0 but @texnixe has tested this and told me it goes back to 3.1.0

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions