Bug 28682 - Record detail page fails if error with search for analytics
Summary: Record detail page fails if error with search for analytics
Status: RESOLVED DUPLICATE of bug 29284
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on: 28513
Blocks:
  Show dependency treegraph
 
Reported: 2021-07-08 01:41 UTC by Fridolin Somers
Modified: 2021-10-20 13:24 UTC (History)
2 users (show)

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


Attachments
Bug 28682: Protect search for analytics in record detail page (4.22 KB, patch)
2021-07-08 01:54 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 28682: Protect search for analytics in record detail page (4.22 KB, patch)
2021-08-11 18:47 UTC, Fridolin Somers
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2021-07-08 01:41:27 UTC
In record detail page, there is a search for analytics, see Bug 15851.

If for any reason this search fails, the page will be broken with 'Internal server error'.

I propose to protect with eval.
Comment 1 Fridolin Somers 2021-07-08 01:54:12 UTC
Created attachment 122661 [details] [review]
Bug 28682: Protect search for analytics in record detail page

In record detail page, there is a search for analytics, see Bug 15851.

If for any reason this search fails, the page will be broken with 'Internal server error'.

This patch adds a protection with eval.

Test plan :
1) Use a Zebra install with no Elasticsearch configuration
2) Go to staff interface
3) Go to any record detail page : no error
4) Change preference 'SearchEngine' to 'Elasticsearch'
5) Refresh ecord detail page : check you have no error
6) Check a record with analytics link
7) Repeat 3 to 6 on OPAC
Comment 2 Fridolin Somers 2021-07-08 02:03:30 UTC
The one case reported to me (Koha 20.11 with ES) is a title : Viva la revolution !

I don't know why analytics search fails but it should not block the page.
And in UNIMARC seems analytics search is not used.
Comment 3 Fridolin Somers 2021-07-08 02:04:43 UTC
28513 (edit) (In reply to Fridolin Somers from comment #2)
> The one case reported to me (Koha 20.11 with ES) is a title : Viva la
> revolution !
> 
> I don't know why analytics search fails but it should not block the page.
> And in UNIMARC seems analytics search is not used.

And fails even with apply of Bug 28513 :(
Comment 4 Didier Gautheron 2021-07-20 09:54:38 UTC
Missing a ; in opac/opac-detail.pl

compilation error:
Could not compile /home/koha/src/opac/opac-detail.pl: syntax error at /home/koha/src/opac/opac-detail.pl line 199, near "my "
Comment 5 Fridolin Somers 2021-08-11 09:29:46 UTC
Oupsy :)
Comment 6 Fridolin Somers 2021-08-11 18:47:29 UTC
Created attachment 123800 [details] [review]
Bug 28682: Protect search for analytics in record detail page

In record detail page, there is a search for analytics, see Bug 15851.

If for any reason this search fails, the page will be broken with 'Internal server error'.

This patch adds a protection with eval.

Test plan :
1) Use a Zebra install with no Elasticsearch configuration
2) Go to staff interface
3) Go to any record detail page : no error
4) Change preference 'SearchEngine' to 'Elasticsearch'
5) Refresh ecord detail page : check you have no error
6) Check a record with analytics link
7) Repeat 3 to 6 on OPAC
Comment 7 Fridolin Somers 2021-08-11 18:48:35 UTC
I rise to major because it can block one of the most important page, and impact OPAC
Comment 8 Martin Renvoize 2021-09-01 15:25:01 UTC
I'm not so sure about this.. bug 28316 and bug 28484 resolve at a lower level by cleaning the search query so you yield the right results rather than hiding any results.
Comment 9 Fridolin Somers 2021-09-01 19:10:37 UTC
(In reply to Martin Renvoize from comment #8)
> I'm not so sure about this.. bug 28316 and bug 28484 resolve at a lower
> level by cleaning the search query so you yield the right results rather
> than hiding any results.

OK maybe we just keep this fix for versions < 21.11.
Comment 10 Martin Renvoize 2021-10-20 13:24:17 UTC

*** This bug has been marked as a duplicate of bug 29284 ***
Comment 11 Martin Renvoize 2021-10-20 13:24:47 UTC
Nice adds a similar patch, but I prefer his scope and output so I'll QA that one in preference.. Marking as duplicate.