[MGNLEESOLR-88] Pager duplicates "currentPage" string while used with other params in link Created: 06/Nov/15  Updated: 15/Apr/16  Resolved: 07/Dec/15

Status: Closed
Project: Solr Search Provider
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.1

Type: Bug Priority: Major
Reporter: Mariusz Chruscielewski Assignee: AntonĂ­n Juran
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 2d 4h 27.5m
Original Estimate: Not Specified

Issue Links:
causality
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Sprint: Kromeriz 22
Story Points: 3

 Description   

When pager is only one (or first) argument in request it works fine, when it has other arguments in front of it, it duplicates "currentPage"

http://localhost:8080/magnoliaAuthor/member-centre/members-overview.html?queryStr=management&country=&currentPage=2&currentPage=3

Problem starts in AbstractSearchResultModel.java when you get:

 currentPageLink = MgnlContext.getAggregationState().getOriginalURL();

getOriginalURL() returns escaped string so & is returned as

&

there is a getOriginalBrowserURL() which returns unescaped string

and then in SolrPager.java, in public String getPageLink(int i)
you split parameters by :
String[] params = query.split("&");

which creates parameters like:

amp;currentPage=2 and you check if string startsWith("currentPage=")

can you please fix that?



 Comments   
Comment by Milan Divilek [ 24/Nov/15 ]

Test please. Should be easy one.

Comment by Milan Divilek [ 07/Dec/15 ]

Reopen: contextpath is missing in link.

Generated at Mon Feb 12 10:59:59 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.