Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If you add a view where one display has offset in the pager and shows m elements; if you add an attachment to that view showing the offset quantity of rows; and if rows quantity is (n*m + offset) elements; you get a pager with one more item than expected. This extra item redirect to last useful pager item.
Example:
View:
Display: Attachment
Shows: 1 element
Offset: 0
Display: Page
Shows: Full pager (6 elements)
Offset: 1
Total Elements: 19
The expected behavior is to get 3 pages; because (19-1)/6 = 3; but it's getting 4 pages because it's not substracting the offset.
Comment | File | Size | Author |
---|---|---|---|
#1 | views-php_pager-elements-not-respecting-total-items-minus-offset_2340347-1.patch | 621 bytes | kporras07 |
Comments
Comment #1
kporras07 CreditAttribution: kporras07 commentedPatch attached