Bug #82034
closedf:be.widget.paginate manual paging not working correctly (solution included)
100%
Description
See /typo3/sysext/fluid/Resources/Private/Templates/ViewHelpers/Be/Widget/Paginate/Index.html
When using this pager in a backendmodule the manual input fails. This is caused by the fact that the inline javascript uses a string comparison instead of integers:
12: if (page > numberOfPages) {
13: page = numberOfPages;
14: } else if (page < 1) {
15: page = 1;
16: }
Both page and numberOfPages are strings. In my case my page was "5" and the numberOfPages "219", which converts to true on line 12, causing page to be overwritten with numberOfPages and thus sending you to the last page instead of page 5.
Solution:
10: var numberOfPages = parseInt(formField.dataset.numberOfPages);
11: var page = parseInt(formField.value);
Files
Updated by Ronald Kools over 7 years ago
- File widgetbug.png widgetbug.png added
Added an image with the highlighted area that is causing the problem.
Updated by Gerrit Code Review over 7 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/53686
Updated by Gerrit Code Review over 7 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/53686
Updated by Gerrit Code Review over 7 years ago
Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53688
Updated by Wolfgang Klinger over 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset bd1bf0bce0259438825f626c65ebebcf88a6825b.