Bug 23132 - Encoding issues in facets with show more link
Summary: Encoding issues in facets with show more link
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Fridolin SOMERS
QA Contact: Testopia
URL:
Keywords:
Depends on: 21526
Blocks:
  Show dependency treegraph
 
Reported: 2019-06-17 14:25 UTC by Fridolin SOMERS
Modified: 2019-08-14 17:22 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.11.00,19.05.02


Attachments
Bug 23132: Fix encoding issues in facets with show more link (2.04 KB, patch)
2019-06-17 14:31 UTC, Fridolin SOMERS
Details | Diff | Splinter Review
Bug 23132: Fix encoding issues in facets with show more link (2.11 KB, patch)
2019-06-19 02:58 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 23132: Fix encoding issues in facets with show more link (2.17 KB, patch)
2019-06-19 13:15 UTC, Julian Maurice
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin SOMERS 2019-06-17 14:25:03 UTC
When one uses characters like é, à, ç ... the first search show up correctly but when you refine your search with "Show more", the encoding becomes bad and so, results of the search too.
Comment 1 Fridolin SOMERS 2019-06-17 14:25:52 UTC
A quick fix of Bug 22903 problem
Comment 2 Fridolin SOMERS 2019-06-17 14:27:27 UTC
Same fix as commit :
Bug 21526: Fix search result pages (url vs uri vs raw)
Comment 3 Fridolin SOMERS 2019-06-17 14:31:11 UTC
Created attachment 90673 [details] [review]
Bug 23132: Fix encoding issues in facets with show more link

When one uses characters like Ã, ç ... the first searcshow up correctly but when you refine your search with "Show more", the encoding becomes bad and so, results of the search too.

Test plan :

Without the patch:
- check if you have your SysPref SearchEngine with Elasticsearch as value,
- put your SysPref FacetMaxCount at 10,
- search in the catalog "a" and then in Refine your search click on show more (just to see how it works),
- then search with special characters like "é", ç" ... and make the same test, the research should be wrong when you click on show more and the page is realoaded.

Then apply the patch:
- and make the same with a classic reasearch, then with special characters,
- verify that when you click on show more the page isn't realoded and the reasearch is correct.
- same with show less
- and finnaly, add some facets and test show more/less
Comment 4 Jonathan Druart 2019-06-19 02:52:37 UTC
(In reply to Fridolin SOMERS from comment #2)
> Same fix as commit :
> Bug 21526: Fix search result pages (url vs uri vs raw)

I do not understand which part of this patch you are referring to.
Comment 5 Jonathan Druart 2019-06-19 02:57:14 UTC
(In reply to Jonathan Druart from comment #4)
> (In reply to Fridolin SOMERS from comment #2)
> > Same fix as commit :
> > Bug 21526: Fix search result pages (url vs uri vs raw)
> 
> I do not understand which part of this patch you are referring to.

Ok got it. The $raw was used in opac-facets.inc, not facets.inc
Comment 6 Jonathan Druart 2019-06-19 02:58:53 UTC
Created attachment 90767 [details] [review]
Bug 23132: Fix encoding issues in facets with show more link

When one uses characters like Ã, ç ... the first searcshow up correctly but when you refine your search with "Show more", the encoding becomes bad and so, results of the search too.

Test plan :

Without the patch:
- check if you have your SysPref SearchEngine with Elasticsearch as value,
- put your SysPref FacetMaxCount at 10,
- search in the catalog "a" and then in Refine your search click on show more (just to see how it works),
- then search with special characters like "é", ç" ... and make the same test, the research should be wrong when you click on show more and the page is realoaded.

Then apply the patch:
- and make the same with a classic reasearch, then with special characters,
- verify that when you click on show more the page isn't realoded and the reasearch is correct.
- same with show less
- and finnaly, add some facets and test show more/less

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Julian Maurice 2019-06-19 13:15:32 UTC
Created attachment 90788 [details] [review]
Bug 23132: Fix encoding issues in facets with show more link

When one uses characters like Ã, ç ... the first searcshow up correctly but when you refine your search with "Show more", the encoding becomes bad and so, results of the search too.

Test plan :

Without the patch:
- check if you have your SysPref SearchEngine with Elasticsearch as value,
- put your SysPref FacetMaxCount at 10,
- search in the catalog "a" and then in Refine your search click on show more (just to see how it works),
- then search with special characters like "é", ç" ... and make the same test, the research should be wrong when you click on show more and the page is realoaded.

Then apply the patch:
- and make the same with a classic reasearch, then with special characters,
- verify that when you click on show more the page isn't realoded and the reasearch is correct.
- same with show less
- and finnaly, add some facets and test show more/less

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 8 Martin Renvoize 2019-06-20 08:34:00 UTC
Nice work!

Pushed to master for 19.11.00
Comment 9 Fridolin SOMERS 2019-07-15 13:31:02 UTC
Pushed to 19.05.x for 19.05.02
Comment 10 Lucas Gass 2019-08-14 17:22:00 UTC
backported to 18.11.x for 18.11.09