[MGNLSTK-539] STKPager: Error on manipulating parameters Created: 01/Dec/09 Updated: 04/Nov/15 Resolved: 04/Nov/15 |
|
| Status: | Closed |
| Project: | Magnolia Standard Templating Kit (closed) |
| Component/s: | paragraphs |
| Affects Version/s: | 1.1.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Oliver Emke | Assignee: | Philipp Bärfuss |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: |
|
| Patch included: |
Yes
|
| Acceptance criteria: |
Empty
|
| Date of First Response: |
| Description |
|
By manipulating the STKPager paging-parameter "currentPage" a freemarker exception is thrown. The problem occurs by following values:
The function getCurrentPage() should handle the wrong parameters. public int getCurrentPage() { int currentPage = 1; String paramCurrent = MgnlContext.getParameter("currentPage"); if (StringUtils.isNotBlank(paramCurrent) && StringUtils.isNumeric(paramCurrent)) { try { currentPage = Integer.parseInt(paramCurrent); if (currentPage > getNumPages() || currentPage < 1) { currentPage = 1; } } catch (NumberFormatException e) { log.warn("Wrong currentPage parameter with value [{}] is given. Set currentPage to 1.", paramCurrent); } } return currentPage; } |
| Comments |
| Comment by Michael Mühlebach [ 04/Nov/15 ] |
|
Given the thousands of other issues we have open that are more highly requested, we won't be able to address this issue in the foreseeable future. Instead we will focus on issues with a higher impact, and more votes. |