Bug #28283

Paginate Widget does not highlight current page

Added by Bastian Waidelich over 10 years ago. Updated almost 7 years ago.

Status:
Resolved
Priority:
Should have
Category:
Widgets
Target version:
-
Start date:
2011-07-18
Due date:
% Done:

100%

Estimated time:
Has patch:
No

Description

The line

$pages[] = array('number' => $i, 'isCurrent' => ($i === $this->currentPage));

PaginateController::buildPagination() fails to set 'isCurrent' correctly for certain pages because $i is of type float and thus not (type safe) equal to $this->currentPage.

#1

Updated by Bastian Waidelich over 10 years ago

  • Subject changed from Paginate Widget fails to cast current page to integer to Paginate Widget does not highlight current page
#2

Updated by Mr. Hudson over 10 years ago

Patch set 1 of change I9fda9b95be1f21df56aed0d7f5356d544aa86f85 has been pushed to the review server.
It is available at http://review.typo3.org/3395

#3

Updated by Bastian Waidelich over 10 years ago

  • Status changed from Accepted to Under Review
#4

Updated by Bastian Waidelich over 10 years ago

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

Updated by Georg Tiefenbrunn almost 8 years ago

$this->numberOfPages = ceil(...); in initializeAction() returns a float and should also be converted to integer. If there are 10 pages and you manually set 'currentPage' to 11+, 'isCurrent' is still incorrectly set.

#6

Updated by Bastian Waidelich almost 8 years ago

  • Status changed from Resolved to Accepted

Georg Tiefenbrunn wrote:

$this->numberOfPages = ceil(...); in initializeAction() returns a float and should also be converted to integer. If there are 10 pages and you manually set 'currentPage' to 11+, 'isCurrent' is still incorrectly set.

Thanks for the feedback, I'll look into this asap

#7

Updated by Bastian Waidelich over 7 years ago

Bastian Waidelich wrote:

Thanks for the feedback, I'll look into this asap

cough sorry, I lost track of this one somehow.. Finally managed to insert the 9 characters: https://review.typo3.org/30119

#8

Updated by Bastian Waidelich over 7 years ago

  • Status changed from Accepted to Under Review
#9

Updated by Bastian Waidelich almost 7 years ago

  • Status changed from Under Review to Resolved

This has been merged in june already (see https://review.typo3.org/30119)

Also available in: Atom PDF