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