Make pager start counting from 1, not 0

Created on 19 October 2012, over 11 years ago
Updated 16 June 2023, about 1 year ago

Problem/Motivation

The pager starts counting from 0, which for a human is very confusing as no page 0 exists. This also causes the page numbers displayed in the pager and in the URL to be different from each other.

Now when Views is looking to get into D8, then #1024226: Option to start Pager count at 1 instead of 0 β†’ is related to this as well. Unless they will merge into one pager.

Beta phase evaluation

<!--Uncomment the relevant rows for the issue. -->

Proposed resolution

Do not alter the internal page number, but only show a pager starting at 1 in the URL.

Remaining tasks

<!-- See https://drupal.org/core-mentoring/novice-tasks for tips on identifying novice tasks. Delete or add "Novice" from the Novice? column in the table below as appropriate. Uncomment tasks as the issue advances. Update the Complete? column to indicate when they are done, and maybe reference the comment number where they were done. -->

User interface changes

None

API changes

None

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
BaseΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡ΈπŸ‡ͺSweden tsvenson

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024