Problem/Motivation
If you create a view with the pager options set to no limit by setting the items per page to 0, but then allow users to control the number per page, the page loads with the the 'Items per page' drop down defaulting to the first of these options even though all items are displayed.
Steps to reproduce
- Install Drupal
- Create 10 articles
- Create a view page of articles with the following pager settings:
- 0 items per page (no limit)

- Check 'Allow user to control the number of items displayed in this view' and 'Allow user to display all items'

- View the page, see that the 'Items per page' drop down displays '5' even though all items are displayed

Proposed resolution
If the pager is configured with no limit, set the dropdown default to - All -
Remaining tasks
- Confirm this should be addressed
- Write patch with tests
- Review
User interface changes
N/A
API changes
N/A
Data model changes
N/A
Release notes snippet
N/A
Original report by miiimooo
I have a pager set to 0 to display all items by default. When the view with the exposed filters is displayed the initial value is the first from the "Exposed items per page options". Although all items are displayed at this point the next time a filter is applied it will be limited to 5 results.
When the limit is set to 0 and the EXPOSED OPTIONS has "Allow user to display all items" set then it should select the label set in the "All items label"
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | items-2.png | 6.23 KB | miiimooo |
| #2 | items-0.png | 34.52 KB | miiimooo |
| #2 | items-1.png | 15.14 KB | miiimooo |
Comments
Comment #2
miiimoooComment #5
pameeela commentedI'm not convinced this is a bug, as it doesn't seem safe to assume that 'Items per page' will work perfectly if you aren't using a pager. But, since it is possible to configure this, it may be fair enough that it should work?
I have updated the IS for clarity as it took me a while to understand the issue.
Comment #6
pameeela commentedComment #7
pameeela commentedComment #8
pameeela commentedComment #14
johnvComment #15
johnvComment #16
johnvSorting multiple issues with "Pager option 'Items per page' with value 0" alphabetically.