https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713
--- Comment #17 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 211665 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=211665&action=edit Bug 41713: (QA follow-up) Do not crash for invalid MARC, and test without a search engine node Bug 35117 now builds the search of the component parts (a title search) for a record without a 001, so the query is always defined and the "// ''" that hides the warning of the QueryBuilder is not needed any more: it would only send an empty search. Drop it. catalogue/detail.pl: with the components of a record that has invalid MARC set to undef, the new "if ( @{$components} )" dies with "Can't use an undefined value as an ARRAY reference". Use an empty list, as get_marc_components does when there is nothing to find. Also keep reporting a failed search: analytics_error was only set inside the block that now runs only when there are components, which is never the case when the search fails. t/db_dependent/Koha/Biblio.t: the test called get_marc_components, which searches, so it needed an Elasticsearch node and failed on a Zebra instance ("[NoNodes] No nodes are available"). Call get_components_query, which only builds the query, and check that one is built without warnings. To test: 1. prove t/db_dependent/Koha/Biblio.t on an instance with Zebra: it passes without an Elasticsearch node 2. Set UseControlNumber and ShowComponentRecords, open in the staff interface and the OPAC a record without a 001: no warning in the logs 3. Break the search of the components (for example stop Elasticsearch): the staff detail page still shows the error about the components -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
