[Bug 11515] New: Encoding problem with OpacBrowseResults
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 Bug ID: 11515 Summary: Encoding problem with OpacBrowseResults Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: fridolyn.somers@biblibre.com QA Contact: testopia@bugs.koha-community.org When OpacBrowseResults syspref is on, the detail page contains a results browser. When search therm contains non-ASCII character, the search query is not well encoded in this browser. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |6483 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 --- Comment #1 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 24113 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=24113&action=edit Bug 11515 - Encoding problem with OpacBrowseResults When OpacBrowseResults syspref is on, the detail page contains a results browser. When search terms contains non-ASCII character, the search query is not well encoded in this browser. This patch adds the URI-coding to search terms into session to avoid any encoding problem with diacritics and URI specific characters like ?,& ... So that TT parameter 'busc' is already URI encoded and can be used to recreate seach URL. Test plan : - Set OpacBrowseResults on - At OPAC, perform a search with a diacritique. For example 'déjà' - Go to detail page of a result => You see browser under "Browser results" - Click on "Back to results" => You get same results and same search term with correct encoding -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |boutrosboutrosboutros@gmail | |.com --- Comment #2 from Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> --- I don't experience this encoding issue, using queries with Norwegian characters or French diactric marks. The query is always correctly displayed. It's also displayed correctly after I apply the patch.. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 --- Comment #3 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- (In reply to Petter Goksøyr Åsen from comment #2) > I don't experience this encoding issue, using queries with Norwegian > characters or French diactric marks. The query is always correctly > displayed. It's also displayed correctly after I apply the patch.. Odd. When I test on master : - simple search at OPAC with "centré" - I have 5 results - I click on a result - I click on "Back to results" => I get the page : "cgi-bin/koha/opac-search.pl?idx=&q=centré", "centré" in search box and no results. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 --- Comment #4 from Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> ---
Odd. When I test on master : - simple search at OPAC with "centré" - I have 5 results - I click on a result - I click on "Back to results" => I get the page : "cgi-bin/koha/opac-search.pl?idx=&q=centré", "centré" in search box and no results.
Hm, I'm on master too. When I search for "øl", get 22 results, click on a result, click "Back to results", I get the page: => http://localhost:9000/cgi-bin/koha/opac-search.pl?q=%C3%B8l "øl" beeing url-encoded into %C3%B8l Its displayed correctly in the browser: => Results of search for 'kw,wrdl: øl' I notice you have idx= in your url, why I dont have that? I am very interested in any encoding-related bugs, because we also experience them on a seemingly random basis. It seems to me that it is not dealt with properly once and for all in Koha (ie. force utf-8 everywhere), but instead patched here and there, with the result that we sometimes get double-encoding issues. However, I do not know enough about Perl or Koha yet, so I might be totally wrong -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #5 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Petter Goksøyr Åsen from comment #4)
It seems to me that it is not dealt with properly once and for all in Koha (ie. force utf-8 everywhere), but instead patched here and there, with the result that we sometimes get double-encoding issues. However, I do not know enough about Perl or Koha yet, so I might be totally wrong
Well, this sounds (unfortunately) quite correct to me :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 --- Comment #6 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- (In reply to Petter Goksøyr Åsen from comment #4)
I notice you have idx= in your url, why I dont have that? I've tested with "øl". It works. Can you test with one of ê,é,è,à,â,ù ?
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 --- Comment #7 from Fridolin SOMERS <fridolyn.somers@biblibre.com> ---
I've tested with "øl". It works. I mean this patch is not needed for "øl".
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 --- Comment #8 from Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> ---
Can you test with one of ê,é,è,à,â,ù ?
I did also try with french characters, It also works: => Results of search for 'kw,wrdl: andré' http://localhost:9000/cgi-bin/koha/opac-search.pl?q=andr%C3%A9 Same with à, ė & ê Can it be that your OS/browser submits the querystring with a French encoding? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 --- Comment #9 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Without patch, when searching "centré", I get in "Back to results" : opac-search.pl?idx=&q=centr%C3%83%C2%A9 My locale is "fr-FR.UTF-8". Seems this bug exists only since 3.14. Can you test on a fresh install ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 --- Comment #10 from Petter Goksøyr Åsen <boutrosboutrosboutros@gmail.com> ---
Seems this bug exists only since 3.14. Can you test on a fresh install ?
By fresh install, do you mean the debian package? And not from git master? -- You are receiving this mail because: You are watching all bug changes.
Seems this bug exists only since 3.14. Can you test on a fresh install ?
By fresh install, do you mean the debian package? And not from git master? No, I mean an install created from scratch, not an existing install with
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 --- Comment #11 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- (In reply to Petter Goksøyr Åsen from comment #10) sources updated to current master. If someone else could test, it would be great. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |sandboxes@biblibre.com --- Comment #12 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Patch tested with a sandbox, by Broust <jean-manuel.broust@univ-lyon2.fr> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 sandboxes@biblibre.com <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #24113|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 --- Comment #13 from sandboxes@biblibre.com <sandboxes@biblibre.com> --- Created attachment 26023 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26023&action=edit Bug 11515 - Encoding problem with OpacBrowseResults When OpacBrowseResults syspref is on, the detail page contains a results browser. When search terms contains non-ASCII character, the search query is not well encoded in this browser. This patch adds the URI-coding to search terms into session to avoid any encoding problem with diacritics and URI specific characters like ?,& ... So that TT parameter 'busc' is already URI encoded and can be used to recreate seach URL. Test plan : - Set OpacBrowseResults on - At OPAC, perform a search with a diacritique. For example 'déjà' - Go to detail page of a result => You see browser under "Browser results" - Click on "Back to results" => You get same results and same search term with correct encoding Signed-off-by: Broust <jean-manuel.broust@univ-lyon2.fr> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Patch doesn't apply CC| |katrin.fischer@bsz-bw.de --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Fridolin, could you check this is still valid on current master? Also... patch doesn't apply. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |fridolyn.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26023|0 |1 is obsolete| | --- Comment #15 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 32063 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=32063&action=edit Bug 11515 - Encoding problem with OpacBrowseResults When OpacBrowseResults syspref is on, the detail page contains a results browser. When search terms contains non-ASCII character, the search query is not well encoded in this browser. This patch adds the URI-coding to search terms into session to avoid any encoding problem with diacritics and URI specific characters like ?,& ... So that TT parameter 'busc' is already URI encoded and can be used to recreate seach URL. Test plan : - Set OpacBrowseResults on - At OPAC, perform a search with a diacritique. For example 'déjà' - Go to detail page of a result => You see browser under "Browser results" - Click on "Back to results" => You get same results and same search term with correct encoding -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Signed Off --- Comment #16 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- (In reply to Katrin Fischer from comment #14)
Fridolin, could you check this is still valid on current master? Still exists withe actual test plan.
Also... patch doesn't apply. Patch rebased.
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #32063|0 |1 is obsolete| | CC| |kyle@bywatersolutions.com --- Comment #17 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 33084 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=33084&action=edit Bug 11515 - Encoding problem with OpacBrowseResults -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 --- Comment #18 from Kyle M Hall <kyle@bywatersolutions.com> --- Works well. I do wonder if this is the level to solve this at, but it works! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #19 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Frido! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11515 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org