Bug 14955 - "Show more" link contains double encoded characters
Summary: "Show more" link contains double encoded characters
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 13789
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-05 10:17 UTC by Jonathan Druart
Modified: 2019-06-27 09:24 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 14955: Don't double encode chars in the "Show more" link (7.22 KB, patch)
2015-10-05 10:23 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14955: Don't double encode chars in the "Show more" link (7.35 KB, patch)
2015-10-13 13:07 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 14955: Don't double encode chars in the "Show more" link (7.48 KB, patch)
2015-10-28 09:24 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 14955: Don't double encode chars in the "Show more" link (7.55 KB, patch)
2015-11-05 06:59 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2015-10-05 10:17:08 UTC

    
Comment 1 Jonathan Druart 2015-10-05 10:23:06 UTC Comment hidden (obsolete)
Comment 2 Joonas Kylmälä 2015-10-13 09:47:20 UTC
After doing the test plan you can't remove the filter item (author). If you click the |x| it will stay still there (and if you try again, it will just stay there....).
Comment 3 Jonathan Druart 2015-10-13 10:57:53 UTC
I have retried and it works here.
What is the url for the [x] link?
Comment 4 Joonas Kylmälä 2015-10-13 11:49:01 UTC
(In reply to Jonathan Druart from comment #3)
> I have retried and it works here.
> What is the url for the [x] link?

http://10.0.3.132/cgi-bin/koha/opac-search.pl?idx=kw&q=a&limit=au%3AHurme-Ker%C3%A4nen%2C%20Auli.&sort_by=relevance_dsc
Comment 5 Jonathan Druart 2015-10-13 13:07:30 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2015-10-13 13:08:01 UTC
Indeed, it worked for the intranet, not for the OPAC.
Comment 7 Jonathan Druart 2015-10-27 14:42:42 UTC
Encoding issue at the OPAC on a stable version, I am raising the severity to major.
Comment 8 Marc Véron 2015-10-28 09:24:55 UTC Comment hidden (obsolete)
Comment 9 Katrin Fischer 2015-11-01 19:09:00 UTC
I am failing to reproduce the problem - not sure what I am missing :(
Comment 10 Koha Team University Lyon 3 2015-11-04 14:55:18 UTC
Katrin,
I haven't test as explained by Jonathan but I have a similar problem : You perform a search with several pages of results. You go on the second page, click on "show more"  the URL contains space characters (I don't really know what sort of characters..) and if you click you don't have any result.
Sonia
Comment 11 Koha Team University Lyon 3 2015-11-04 15:37:34 UTC
I try Jonathan's patch. I confirm that it solves the problem described on the "show more" link (bad characters in the URL). But for me, the problem occurs only from the second page of results and it's not related to the fact of having a facet already selected. The problem exists whatever you have already selected a facet or not.
Comment 12 Katrin Fischer 2015-11-05 06:59:45 UTC
Created attachment 44454 [details] [review]
[PASSED QA] Bug 14955: Don't double encode chars in the "Show more" link

Bug 13789 has fixed this issue for the facet links (select/unselect) but
not for the "Show more" facets link.

This patch reuses the "url" variable, generated for the facets, for
these links. A new "local_url" variable is used to build links for each
entry.

Test plan (for OPAC and intranet):
- Search for a very common term
- Filter the results using facets
- You should get more than 5 entries for a facet and 1 selected:
Author
 author 1
 author 2 [x] # Selected
 author 3
 author 4
 author 5
 Show more # you see this link if there is 5+ values for this facet
- Click on the Show more link
Without this patch, the url contains double-encoded characters and you
will certainly don't get any results
With this patch, you should get results.

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 13 Katrin Fischer 2015-11-05 07:00:45 UTC
I still have a bit of a problem reproducing the issue, but I can verify the change in the URL now and things seem to work like they should. Also trusting the other testers here.
Comment 14 Tomás Cohen Arazi (tcohen) 2015-11-05 12:54:54 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 15 Frédéric Demians 2015-11-29 20:19:57 UTC
This patch has been pushed to 3.20.x, will be in 3.20.6.