[Bug 41713] New: warnings sometimes generated when using ShowComponentRecords feature
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Bug ID: 41713 Summary: warnings sometimes generated when using ShowComponentRecords feature Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl When using ShowComponentRecords feature warnings like: [WARN] Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 352. [WARN] Use of uninitialized value $comp_query_str in concatenation (.) or string at /kohadevbox/koha/catalogue/detail.pl line 273. are generated from staff interface detail view when: 1. ShowComponentRecords = 'both' or 'staff' AND 2. UseControlNumber is on AND 3. record lacks 001 field Similarly, from OPAC interface: [WARN] Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 352. [WARN] Use of uninitialized value $comp_query_str in concatenation (.) or string at /kohadevbox/koha/opac/opac-detail.pl line 640. -- 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=41713 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=41713 --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 192054 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192054&action=edit Bug 41713: warnings sometimes generated when using ShowComponentRecords feature When using ShowComponentRecords feature warnings are generated from staff interface detail view when: 1. ShowComponentRecords = 'both' or 'staff' AND 2. UseControlNumber is on AND 3. record lacks 001 field Test plan ========= 1. Have a standard ktd instance with Elasticsearch. 2. Set UseControlNumber systempreference to Use. 3. In OPAC and in staff interface, open in Normal view a record without field 001, e.g. # 399 ("Art Since 1980"). 4. Check plack-opac-error.log and plack-intranet-error.log. You should see fresh warnings like: [WARN] Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 352. [WARN] Use of uninitialized value $comp_query_str in concatenation (.) or string at /kohadevbox/koha/opac/opac-detail.pl line 640 [WARN] Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 352. [WARN] Use of uninitialized value $comp_query_str in concatenation (.) or string at /kohadevbox/koha/catalogue/detail.pl line 273. 5. Apply the patch; restart_all. 6. Repeat p. 4. There should be no new warnings. Sponsored-by: Ignatianum University in Cracow -- 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=41713 --- Comment #2 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 192055 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192055&action=edit Bug 41713: Unit tests -- 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=41713 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |januszop@gmail.com |ity.org | Comma delimited| |Ignatianum University in list of Sponsors| |Cracow Sponsorship status|--- |Sponsored Patch complexity|--- |Trivial patch -- 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=41713 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192054|0 |1 is obsolete| | Attachment #192055|0 |1 is obsolete| | --- Comment #3 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 192056 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192056&action=edit Bug 41713: warnings sometimes generated when using ShowComponentRecords feature When using ShowComponentRecords feature warnings are generated from staff interface detail view when: 1. ShowComponentRecords = 'both' or 'staff' AND 2. UseControlNumber is on AND 3. record lacks 001 field Test plan ========= 1. Have a standard ktd instance with Elasticsearch. 2. Set UseControlNumber systempreference to Use. Set ShowComponentRecords systempreference to both staff and OPAC. 3. In OPAC and in staff interface, open in Normal view a record without field 001, e.g. # 399 ("Art Since 1980"). 4. Check plack-opac-error.log and plack-intranet-error.log. You should see fresh warnings like: [WARN] Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 352. [WARN] Use of uninitialized value $comp_query_str in concatenation (.) or string at /kohadevbox/koha/opac/opac-detail.pl line 640 [WARN] Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 352. [WARN] Use of uninitialized value $comp_query_str in concatenation (.) or string at /kohadevbox/koha/catalogue/detail.pl line 273. 5. Apply the patch; restart_all. 6. Repeat p. 4. There should be no new warnings. Sponsored-by: Ignatianum University in Cracow -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 --- Comment #4 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 192057 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192057&action=edit Bug 41713: Unit tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 --- Comment #5 from Janusz Kaczmarek <januszop@gmail.com> --- Nota bene: the key change is to examine the @{$components} array, not the reference to the array ($components) in 'if' statement. In the old version: if ( my $components = $biblio->get_marc_components(... the condition is always true since get_marc_components always returns an array reference, even if if is an empty array. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192056|0 |1 is obsolete| | Attachment #192057|0 |1 is obsolete| | --- Comment #6 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 192106 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192106&action=edit Bug 41713: warnings sometimes generated when using ShowComponentRecords feature When using ShowComponentRecords feature warnings are generated from staff interface detail view when: 1. ShowComponentRecords = 'both' or 'staff' AND 2. UseControlNumber is on AND 3. record lacks 001 field Test plan ========= 1. Have a standard ktd instance with Elasticsearch. 2. Set UseControlNumber systempreference to Use. Set ShowComponentRecords systempreference to both staff and OPAC. 3. In OPAC and in staff interface, open in Normal view a record without field 001, e.g. # 399 ("Art Since 1980"). 4. Check plack-opac-error.log and plack-intranet-error.log. You should see fresh warnings like: [WARN] Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 352. [WARN] Use of uninitialized value $comp_query_str in concatenation (.) or string at /kohadevbox/koha/opac/opac-detail.pl line 640 [WARN] Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 352. [WARN] Use of uninitialized value $comp_query_str in concatenation (.) or string at /kohadevbox/koha/catalogue/detail.pl line 273. 5. Apply the patch; restart_all. 6. Repeat p. 4. There should be no new warnings. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 --- Comment #7 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 192107 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192107&action=edit Bug 41713: Unit tests Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | Status|Signed Off |Failed QA --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Changes in the first patch look good to me. Have my doubts on the second patch. + t::lib::Mocks::mock_preference( 'SearchEngine', 'Elasticsearch' ); During this subtest, this pref was mocked to Zebra before. Should it be set back? Not sure.. What about the mocks for doing a search on Elastic? You cant really query a search engine here. (You are calling search_compat. See the mocks for Zebra.) And if we are mocking those routines, what is still the use of this test? Can we do without the second patch? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Another observation (out of scope) shift @$operators; # Shift out the one we unshifted before => But this is only done when the $scan is false ! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192106|0 |1 is obsolete| | Attachment #192107|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 --- Comment #10 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 207475 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207475&action=edit Bug 41713: warnings sometimes generated when using ShowComponentRecords feature When using ShowComponentRecords feature warnings are generated from staff interface detail view when: 1. ShowComponentRecords = 'both' or 'staff' AND 2. UseControlNumber is on AND 3. record lacks 001 field Test plan ========= 1. Have a standard ktd instance with Elasticsearch. 2. Set UseControlNumber systempreference to Use. Set ShowComponentRecords systempreference to both staff and OPAC. 3. In OPAC and in staff interface, open in Normal view a record without field 001, e.g. # 399 ("Art Since 1980"). 4. Check plack-opac-error.log and plack-intranet-error.log. You should see fresh warnings like: [WARN] Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 352. [WARN] Use of uninitialized value $comp_query_str in concatenation (.) or string at /kohadevbox/koha/opac/opac-detail.pl line 640 [WARN] Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 352. [WARN] Use of uninitialized value $comp_query_str in concatenation (.) or string at /kohadevbox/koha/catalogue/detail.pl line 273. 5. Apply the patch; restart_all. 6. Repeat p. 4. There should be no new warnings. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 --- Comment #11 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 207476 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207476&action=edit Bug 41713: Unit tests Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 --- Comment #12 from Janusz Kaczmarek <januszop@gmail.com> --- (In reply to Marcel de Rooy from comment #8)
Changes in the first patch look good to me. Have my doubts on the second patch.
+ t::lib::Mocks::mock_preference( 'SearchEngine', 'Elasticsearch' ); During this subtest, this pref was mocked to Zebra before. Should it be set back? Not sure.. What about the mocks for doing a search on Elastic? You cant really query a search engine here. (You are calling search_compat. See the mocks for Zebra.) And if we are mocking those routines, what is still the use of this test?
Can we do without the second patch?
We have discussed the case during KohaCon26. Rebased; setting back to SO. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> 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=41713 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #207475|0 |1 is obsolete| | Attachment #207476|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 207503 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207503&action=edit Bug 41713: warnings sometimes generated when using ShowComponentRecords feature When using ShowComponentRecords feature warnings are generated from staff interface detail view when: 1. ShowComponentRecords = 'both' or 'staff' AND 2. UseControlNumber is on AND 3. record lacks 001 field Test plan ========= 1. Have a standard ktd instance with Elasticsearch. 2. Set UseControlNumber systempreference to Use. Set ShowComponentRecords systempreference to both staff and OPAC. 3. In OPAC and in staff interface, open in Normal view a record without field 001, e.g. # 399 ("Art Since 1980"). 4. Check plack-opac-error.log and plack-intranet-error.log. You should see fresh warnings like: [WARN] Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 352. [WARN] Use of uninitialized value $comp_query_str in concatenation (.) or string at /kohadevbox/koha/opac/opac-detail.pl line 640 [WARN] Use of uninitialized value in concatenation (.) or string at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 352. [WARN] Use of uninitialized value $comp_query_str in concatenation (.) or string at /kohadevbox/koha/catalogue/detail.pl line 273. 5. Apply the patch; restart_all. 6. Repeat p. 4. There should be no new warnings. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 207504 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=207504&action=edit Bug 41713: Unit tests Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA CC| |pedro.amorim@openfifth.co.u | |k --- Comment #15 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Hi all, two things here I believe we need to address: A) catalogue/detail.pl now crashes for records with invalid but recoverable MARC (the degraded view from Bug 29697, see also Bug 35099). $components is still set to undef when $invalid_marc_record is true, and the new 'if ( @{$components} )' dies with "Can't use an undefined value as an ARRAY reference" (the old code tested the assignment first, so it never dereferenced undef). Using [] instead of undef in that ternary should fix it. To reproduce: 1) Set 'ShowComponentRecords' to 'Staff interface' 2) Create a new record and note its biblionumber 3) Add an invalid XML character to its MARC: koha-mysql kohadev -e "UPDATE biblio_metadata SET metadata = REPLACE(metadata, '</subfield>', CONCAT(CHAR(11), '</subfield>')) WHERE biblionumber = <biblionumber>" 4) Go to http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=<biblionumber> => without the patch the page loads with the MARC decoding error, with it you get a 500 5) Revert the patch. Repeat 4. Notice the degraded view is shown. B) The new unit test needs a live Elasticsearch node, along the lines of Marcel's comment 8. It calls get_marc_components(), which runs a real search after SearchEngine is mocked to Elasticsearch, so on a Zebra KTD Biblio.t now fails with "[NoNodes] No nodes are available: [http://es:9200]". Before this patch, Biblio.t didn't need one. I believe the test can call get_components_query() instead, which doesn't search and doesn't need Elasticsearch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34482 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34482 [Bug 34482] Improve MARC21 7xx linking fields in bibliographic records [Omnibus] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |35117 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35117 [Bug 35117] get_marc_components and get_marc_volumes should be more consistent -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31608 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 --- Comment #16 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Hi Janusz, Marcel, Pedro, Bug 35117 (get_marc_components and get_marc_volumes consistent) now has a follow-up that fixes the same warnings at the source. With UseControlNumber on and no 001, get_components_query and get_volumes_query fall back to the title search, so a search string is always built and the "uninitialized value" warnings from QueryBuilder.pm and the detail pages do not happen. That overlaps with the "$searchstr // ''" change here, which hides the warning but still sends an empty search. My suggestion: 1. 35117 lands first, so I have made this bug depend on it. 2. This bug keeps the unit tests and Pedro's two points from comment 15: the crash in catalogue/detail.pl for records with invalid but recoverable MARC (use [] rather than undef), and the unit test. 3. The "// ''" change in Koha/Biblio.pm is dropped. Does that sound right to you? If it helps, I can rework the patch here once 35117 is signed off. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=44064 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 --- Comment #17 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off --- Comment #18 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Hi Janusz, Marcel, Pedro, I have attached a follow-up on top of the two signed-off patches, which are unchanged. It applies on top of bug 35117. - The "// ''" in Koha/Biblio.pm is dropped. With bug 35117 a search is always built for a record without a 001, so it is not needed and would only send an empty search. - Pedro's first point: catalogue/detail.pl uses an empty list instead of undef for a record with invalid MARC. I could reproduce the "Can't use an undefined value as an ARRAY reference" and the follow-up removes it. Note that on current master a record that cannot be repaired at all fails earlier in detail.pl and later in C4/XSLT.pm, so this is only visible once the degraded view works for such records, but the change is correct on its own. - The analytics_error was only set inside the "if ( @{$components} )" block, so it was never set when the search fails. It is set before the block now. To test: with the search engine not available, the staff detail page shows "There was an error searching for analytic records". - Pedro's second point: the unit test calls get_components_query, which only builds the query, instead of get_marc_components, so it needs no Elasticsearch node. The previous version fails on a Zebra instance with "[NoNodes] No nodes are available", this one passes on it. This still depends on bug 35117. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org