[Bug 30691] New: ElasticSearch Indexer crashes on authtypecode NAME_EVENT
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30691 Bug ID: 30691 Summary: ElasticSearch Indexer crashes on authtypecode NAME_EVENT Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: domm@plix.at When GuessAuthTypeCode encounters a record containing tag 147, it returns 'NAME_EVENT'. But in the default Koha installation, 'NAME_EVENT' is not registered in auth_types: select * from auth_types where authtypecode = 'NAME_EVENT'; Empty set (0.000 sec) This causes a bug in Koha/SearchEngine/Elasticsearch.pm:362, because $field is undefined and then passed on to C4::Heading->new_from_field, which dies: Can't call method "tag" on an undefined value at /usr/share/koha/lib/C4/Heading.pm line 71 A simple fix (will be provided soon) is to just ignore and report such cases (as done a few lines further down in Koha/SearchEngine/Elasticsearch.pm, when there is no $authtypecode. -- 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=30691 Thomas Klausner <domm@plix.at> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |domm@plix.at |ity.org | CC| |domm@plix.at --- Comment #1 from Thomas Klausner <domm@plix.at> --- Created attachment 134639 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=134639&action=edit Skip unknown authtypes instead of dying Fixes the bug... -- 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=30691 --- Comment #2 from Thomas Klausner <domm@plix.at> --- Test Plan: * Confirm that you do not have an authtype 'NAME_EVENT' (either in the DB or /cgi-bin/koha/admin/authtypes.pl * Enable ElasticSearch * Create or edit an authoritiy record of type 'MEETI_NAME', make sure that 111 is empty, and 147 has some content (you might even need to fiddle with the frameworks to show the 147 form in the editor) * Note the ID of the auth record * Run the ES indexer, limited on the auth id: bin/search_tools/rebuild_elasticsearch.pl -a -v -ai $YOUR_AUTH_ID * The script will die with a message like: [2374] Committing final records... Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202. Use of uninitialized value $tag in regexp compilation at /usr/share/perl5/MARC/Record.pm line 206. Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 207. Can't call method "tag" on an undefined value at /usr/share/koha/lib/C4/Heading.pm line 71. Now apply the patch. * Run ES indexer again * It should now report something like [2374] Committing final records... Cannot handle authority type NAME_EVENT for record: 1046314. It seems like this authority type is not defined in your instance at /usr/share/koha/lib/Koha/SearchEngine/Elasticsearch.pm line 566. [2374] Total 1 records indexed Sponsored-by: Steiermärkische Landesbibliothek -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30691 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED Depends on| |21958 CC| |nick@bywatersolutions.com, | |phil@chetcolibrary.org Severity|enhancement |normal --- Comment #3 from Phil Ringnalda <phil@chetcolibrary.org> --- Test plan can't go in that order, because GuessAuthTypeCode runs and we throw when you save the authority record. So it has to be * Leave SearchEngine set to Zebra * Edit MEETI_NAME framework, uncheck Mandatory for tag 111 * Create authority with 147 and no 111 * Switch SearchEngine to ElasticSearch, reindex Seems like a bug that we include 147 in every authtype framework, since having two 1xx headings in an authority record is both invalid and not going to work, and you have to go to a lot of trouble to make the one that should be mandatory for that authtype not mandatory to have the 147 even pretend to do something. But since 147 and 162 exist, but are too obscure to be worth shipping an authtype framework for them, this seems like a reasonable solution if people do the wrong thing trying to use them. The patch doesn't work, though, since some stray whitespace crept into "->as _string." Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21958 [Bug 21958] _check_valid_auth_link checks too many subfields -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30691 --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Should this be Needs Signoff? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30691 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30691 Phil Ringnalda <phil@chetcolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #5 from Phil Ringnalda <phil@chetcolibrary.org> --- No, since "The patch doesn't work, though, since some stray whitespace crept into "->as _string."" -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org