Am I going crazy or have I found a bug?
If I put exactly 21 files in a folder and vire the folder I only see 20 items and there is no navigation to go to page 2 to see the remaining item.
If I add an additional file making 22 files in the folder then the navigation link to page 2 apears and I can see the remaining 2 items.
Am I going crazy or is this a bug? A quick search has not yielded a bug report but maybe I'm missing it?
Plone 5.0.7 (5017)
Python 2.7.10 (default, Jun 1 2016, 16:02:12) [GCC 4.9.2]
PIL 3.4.2 (Pillow)
Any thoughts welcome!
It's a known bug, reported here: https://github.com/plone/plone.batching/issues/9
I recommend opening a new bug in the Products.CMFPlone tracker mentioning the issue above, for better visibility.
No it is not a bug, as it is intended from Usability aspects, that if you have exactly pagination elements + 1, all those p+1 are shown on the last page, which in this context is the first page, count on that page, all elements are there.
Sorry my initial post was not clear enough.
If there are 20 items I see them all on one page.
If there are 21 items I ONLY SEE 20 on one page and no navigation to page 2.
If there are 22 items I see 20 on page 1 and 2 on page 2.
I understand that it SHOULD work like loechel describes ie: to avoid "orphans" (I think is the term used in typesetting at least). But sadly as rafaelbco says there is a bug in plone.batching.
I think I have isolated the function which needs attention but will need to find time to work on this some more.
I have made a fork on git hub and if I manage to fix this issue a pull request.
Thanks everyone for your input and pointers!