Bug 29284: Don't die on analytics searching error
authorNick Clemens <nick@bywatersolutions.com>
Wed, 20 Oct 2021 12:46:07 +0000 (12:46 +0000)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Sun, 30 Jan 2022 23:45:57 +0000 (00:45 +0100)
commit6ec5e00e6aef5529850e09cc7a29dce9a0632f01
tree303f6cf15d07cefeeeb107143533fbc8a9d898db
parentfc229c123ea5701d42bba152daac8cff70166eef
Bug 29284: Don't die on analytics searching 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>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
(cherry picked from commit ab13f33eaee2599beb376366524d92afa79df034)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
catalogue/detail.pl
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
opac/opac-detail.pl