[Bug 29284] New: Koha dies when an analytics search fails in Elasticsearch
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Bug ID: 29284 Summary: Koha dies when an analytics search fails in Elasticsearch Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com Bug 28316 added some escaping of reserved ES characters, bug 28484 used the escaping on detail pages, however, it seems there may still be combinations that break the search. We should prevent a failure when loading these records To recreate: 1 - Add a title to catalog, with 245a: Digger does it all (not really!) 2 - Set searchEngine preference to: Elasticsearch 3 - The record does not load -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126583 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126583&action=edit Bug 29284: Don't die on analytics searchign error This patch adds an eval around the call to search for analytic records It pases a value to the template on the staff side, but logs the warning on the opac This seems similar to 'decoding_error' which is noted on staff side, but absent on OPAC The eval follows the patter used during searching To test: 1 - Add a title to catalog, with 245a: Digger does it all (not really!) 2 - Set searchEngine preference to: Elasticsearch 3 - The record does not load 4 - Apply patch 5 - The record loads, there is a note about analytics at the top fo the record 6 - View record in opac, no note 7 - Check logs on intranet and opac, searching error is logged -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126584 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126584&action=edit Bug 29284: Handle the case of an exclamation point in parentheses This expands the regex to handle this specific case To test: 1 - Load record created for last patch 2 - Note analytics error 3 - Apply patch 4 - Restart and reload 5 - No more errorm also no Analytics link 6 - Add a 773$t to a record with title used before: Digger does it all (not really!) 7 - reload the initial record 8 - See 'Show analytics' link 9 - Click the link 10 - You should end up on the record you added the 773 to -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com Depends on| |28316 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28316 [Bug 28316] Fix ES crashes related to various punctuation characters -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28682 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #3 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- *** Bug 28682 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126583|0 |1 is obsolete| | --- Comment #4 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 126586 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126586&action=edit Bug 29284: Don't die on analytics searchign error This patch adds an eval around the call to search for analytic records It pases a value to the template on the staff side, but logs the warning on the opac This seems similar to 'decoding_error' which is noted on staff side, but absent on OPAC The eval follows the patter used during searching To test: 1 - Add a title to catalog, with 245a: Digger does it all (not really!) 2 - Set searchEngine preference to: Elasticsearch 3 - The record does not load 4 - Apply patch 5 - The record loads, there is a note about analytics at the top fo the record 6 - View record in opac, no note 7 - Check logs on intranet and opac, searching error is logged Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #126584|0 |1 is obsolete| | --- Comment #5 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 126587 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126587&action=edit Bug 29284: Handle the case of an exclamation point in parentheses This expands the regex to handle this specific case To test: 1 - Load record created for last patch 2 - Note analytics error 3 - Apply patch 4 - Restart and reload 5 - No more errorm also no Analytics link 6 - Add a 773$t to a record with title used before: Digger does it all (not really!) 7 - reload the initial record 8 - See 'Show analytics' link 9 - Click the link 10 - You should end up on the record you added the 773 to Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #6 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Clear and concise patch that does what it says on the tin. QA scripts are happy and testing shows it all works as expected. Going straight for QA on this one as it's a major with a minimal complexity fix. PQA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com Status|Passed QA |Failed QA --- Comment #7 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- 1. Please improve the error handling [2021/10/21 08:08:21] [WARN] Use of uninitialized value $err in concatenation (.) or string at /kohadevbox/koha/catalogue/detail.pl line 150. + if ($err || $@){ + warn "Warning from simple_search_compat: $err.$@"; 2. Second patch needs tests. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 --- Comment #8 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126656 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126656&action=edit Bug 29284: Unit test -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126657 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126657&action=edit Bug 29284: (follow-up) Improve error logging to prevent warns -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 126658 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=126658&action=edit Bug 29284: (follow-up) Fix code that I copied from too -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 --- Comment #11 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Pushed to master for 21.11, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|21.11.00 |21.11.00,21.05.05 released in| | --- Comment #12 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.05.x for 21.05.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Doesn't 20.11 need this too? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|21.11.00,21.05.05 |21.11.00,21.05.05,20.11.14 released in| | CC| |victor@tuxayo.net Status|Pushed to stable |Pushed to oldstable --- Comment #14 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Backported: Pushed to 20.11.x branch for 20.11.14 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29284 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Pushed to oldoldstable -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org