Issue Bug Closed

#85585 Fluid's widget.paginate view helper does not respect limit on last page

Georg Tiefenbrunn 07/18/18, 11:20 updated 05/07/19, 12:17

Description

f:widget.paginate always fetches $itemsPerPage on the last page of a paginated query result.

If there are e.g. 30 total records and the query result is limited to to 21 ($query->setLimit(21); in the repository) will produce 3 pages (using the default itemsPerPage = 10 setting).

Expected behavior: Page 3 only lists record 21

Current behavior: Page 3 lists record 21 to 30

TYPO3 8.7 https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_8-7/typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/PaginateController.php#L100
TYPO3 9.x master https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/PaginateController.php#L100

Reviews 1