Make pager start counting from 1, not 0

Created on 19 October 2012, over 12 years ago
Updated 16 June 2023, over 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 4 hours 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.

  • πŸ‡΅πŸ‡±Poland azovsky

    Any update on this?

  • Status changed to Closed: outdated about 1 month ago
  • πŸ‡³πŸ‡±Netherlands johnv

    Thisis fixed ITMT.

    The pager starts with 1, whereas the URL starts with 0.

  • πŸ‡ͺπŸ‡ΈSpain penyaskito Seville πŸ’ƒ, Spain πŸ‡ͺπŸ‡Έ, UTC+2 πŸ‡ͺπŸ‡Ί

    This is still an issue as of the URL argument. Also involves every paging, not only views. Reopening.

  • πŸ‡³πŸ‡±Netherlands johnv

    I am triaging all pager issues. But need ot organize the first.
    Since not all agree on the necessity, let's move this to Bug report, not Task,
    And move to Views module, even though is is change din Database lib.

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    Not all pagers are in views, are you sure this issue is about the views pager?

    There is mention for both core prayer and views it probably belongs in base.

    Do you have an issue to discuss what your plan is for pagers?

    At the moment it just seems like you are bulk renaming issues that have not been touched in years and have no patches or work.

    If there is a planning issue it would be nice if you could link to it.

    If not please create one and link to it, so we can discuss process.

Production build 0.71.5 2024