-
Bug
-
Resolution: Fixed
-
Major
-
1.4.2
-
None
-
None
-
all systems
-
-
Yes
-
Empty show more show less
STKPager calculates wrong sublist for display due to an error in the offset calculation. This was introduced by the update from 1.4.1 to 1.4.2:
protected int getOffset() { int offset = ((getCurrentPage()) * maxResultsPerPage) -1; if(offset > count) { int pages = count / maxResultsPerPage; offset = pages * maxResultsPerPage; } return offset; }
should be
protected int getOffset() { int offset = (getCurrentPage() - 1) * maxResultsPerPage; if(offset > count) { int pages = count / maxResultsPerPage; offset = pages * maxResultsPerPage; } return offset; }
Acceptance criteria
- caused by
-
MGNLSTK-677 Exception in STKPager::getPageItem()
- Closed
- is causing
-
MGNLSTK-988 STKPager calculates wrong -> newsOverview component displays wrong amount of itmes.
- Closed
- is duplicated by
-
MGNLSTK-749 STKPager: getOffset()
- Closed