Bug 18193 - Elasticsearch - adding new records from Z39.50 results in 'internal server error'
Summary: Elasticsearch - adding new records from Z39.50 results in 'internal server e...
Status: RESOLVED DUPLICATE of bug 18822
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching - Elasticsearch (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-01 15:35 UTC by Nick Clemens (kidclamp)
Modified: 2020-11-10 13:53 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2017-03-01 15:35:39 UTC
To recreate:
1 - Go to cataloging
2 - Select 'New from Z39/50'
3 - Search, find a record, import
4 - Save the record
5 - Error!

Checking the logs you should see a dump of the record in xml - Koha chokes trying to access it as a MARC::Record

In C4/Search.pm:
2492 If we are using elasticsearch, it'll already be a MARC::Record and this
2493 function needs a new name.
2494 
2495 =cut
2496 
2497 sub new_record_from_zebra {
2498 
2499     my $server   = shift;
2500     my $raw_data = shift;
2501     # Set the default indexing modes
2502     my $search_engine = C4::Context->preference("SearchEngine");
2503     if ($search_engine eq 'Elasticsearch') {
2504         return $raw_data;
2505     }

However, that doesn't seem to be the case, we are still getting marc XML, adding "&& 0" to the if and nullifying that section (or removing it) seems to solve the issue
Comment 1 Fridolin Somers 2020-11-10 13:52:42 UTC

*** This bug has been marked as a duplicate of bug 18822 ***
Comment 2 Fridolin Somers 2020-11-10 13:53:25 UTC
Fixed by Bug 18822