https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43643 Bug ID: 43643 Summary: Cannot load records with empty fields Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Staff interface Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com Target Milestone: --- To recreate: Create a record with an empty field (from bug 35104) You can inject either into an existing record's stored metadata via the DB to set up test data: UPDATE biblio_metadata SET metadata = REPLACE(metadata, '</record>', '<datafield tag="500" ind1=" " ind2=" "></datafield></record>') WHERE biblionumber = <some biblionumber>; Try to view the record: Can't call method "leader" on an undefined value at /kohadevbox/koha/catalogue/detail.pl line 202 If you clear that error by editing the code: if( !$invalid_marc_record ){ my $leader = $marc_record->leader(); $dat->{bundlesEnabled} = ( ( substr( $leader, 7, 1 ) eq 'c' ) && C4::Context->preference('BundleNotLoanValue') ) ? 1 : 0; } You still get: Can't call method "as_xml" on an undefined value at /kohadevbox/koha/C4/XSLT.pm line 242 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.