https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41713

Pedro Amorim (ammopt) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Passed QA                   |Failed QA
                 CC|                            |[email protected]
                   |                            |k

--- Comment #15 from Pedro Amorim (ammopt) <[email protected]> ---
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.
_______________________________________________
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/

Reply via email to