Bug #79559

Paginate widget not working with ObjectStorage objects

Added by Nicole Cordes over 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Fluid
Target version:
-
Start date:
2017-01-30
Due date:
% Done:

100%

TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Given:

1) Fluid template

<f:widget.paginate objects="{objectStorage}" as="paginatedObjects" configuration="{itemsPerPage: 9, insertAbove: 0, insertBelow: 1, maximumNumberOfLinks: 10}">
    <f:for each="{paginatedObjects}" as="object" iteration="iterator">
        {iterator.cycle}
    </f:for>
</f:widget.paginate>

2) objectStorage contains 25 items

Expectation:

2 Sites with 9 items each, last page with 7 items

Actual:

3 sites with 9 items each - the last 2 items on page 3 are empty

Associated revisions

Revision 3b3f6296 (diff)
Added by Nicole Cordes over 3 years ago

[BUGFIX] Correct handling of ObjectStorage objects in PaginateController

The current implementation for getting paginated items from ObjectStorage
objects in TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\PaginateController
enforces null items if the count of objects is lower than the
itemsPerPage count. This patch calculates the correct count and returns
valid items only.

Resolves: #79559
Releases: master, 7.6
Change-Id: I5746d83120474d6246da949f67096459ed1076d7
Reviewed-on: https://review.typo3.org/51475
Tested-by: TYPO3com <>
Reviewed-by: Jasmina Ließmann Tested-by: Jasmina Ließmann <code@frauliessmann.de> Reviewed-by: Christian Matthes Tested-by: Christian Matthes Reviewed-by: Joerg Boesche <typo3@joergboesche.de> Reviewed-by: Helmut Hummel <typo3@helhum.io> Tested-by: Helmut Hummel <typo3@helhum.io>

Revision 1d976bb0 (diff)
Added by Nicole Cordes over 3 years ago

[BUGFIX] Correct handling of ObjectStorage objects in PaginateController

The current implementation for getting paginated items from ObjectStorage
objects in TYPO3\CMS\Fluid\ViewHelpers\Widget\Controller\PaginateController
enforces null items if the count of objects is lower than the
itemsPerPage count. This patch calculates the correct count and returns
valid items only.

Resolves: #79559
Releases: master, 7.6
Change-Id: I5746d83120474d6246da949f67096459ed1076d7
Reviewed-on: https://review.typo3.org/51849
Tested-by: TYPO3com <>
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>

History

#1 Updated by Gerrit Code Review over 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51475

#2 Updated by Gerrit Code Review over 3 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51475

#3 Updated by Nicole Cordes over 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#4 Updated by Gerrit Code Review over 3 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51849

#5 Updated by Nicole Cordes over 3 years ago

  • Status changed from Under Review to Resolved

#6 Updated by Benni Mack over 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF