Bug #11007

PaginateController uses wrong offset

Added by Georg Ringer over 4 years ago. Updated about 4 years ago.

Status:Closed Start date:2010-11-22
Priority:Must have Due date:
Assigned To:- % Done:

80%

Category:Widgets
Target version:-
Has patch: Affected Flow version:

Description

The PaginateController doesn't work with an offset set in the original query.

Example:
7 news records should be displayed with an offset of 2 (explanation could be that the 1st 2 records are rendered with a different plugin). itemsPerPage = 3

1st page should show:
item 4
item 5
item 6
2nd page should show
item 7
-------------------------

currently output is:
1st page:
item 4
item 5
item 6
2nd page:
item 4
item 5
item 6
3rd page:
item 7


the possible offset of the query is not checked.

fluid-paginate-offset.patch Magnifier (1.2 kB) Georg Ringer, 2010-11-22 13:32

fluid-paginate-offset_v2.patch Magnifier - patch includes existing type casting again (1.2 kB) Georg Ringer, 2010-11-22 13:41

History

#2 Updated by Bastian Waidelich over 4 years ago

  • Project changed from Extbase MVC Framework to TYPO3.Fluid

#3 Updated by Bastian Waidelich over 4 years ago

  • Category set to Widgets
  • Branch set to v4 + v5

Note: The first part of the patch:

$this->numberOfPages = ceil((count($this->objects)-$query->getOffset()) / (integer)$this->configuration['itemsPerPage']);

is not needed anymore, as count() already retrieves the limited number of result (see #10956)

#4 Updated by Sebastian Kurfuerst about 4 years ago

  • Status changed from New to Closed

should be fixed now, as the Paginate Widget has been completely rebuilt in v5 (and will be soon backported)

Also available in: Atom PDF