Summary: | UNIMARC: Error handling for 100$a incorrect value | ||
---|---|---|---|
Product: | Koha | Reporter: | Adrien SAURAT <adrien.saurat> |
Component: | Cataloging | Assignee: | Bugs List <koha-bugs> |
Status: | NEW --- | QA Contact: | |
Severity: | normal | ||
Priority: | P5 - low | CC: | victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18371 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: |
Description
Adrien SAURAT
2012-01-27 15:54:41 UTC
I don't totally understand this field, would it make sense to use the SetMarcUnicodeFlag function found in C4/Charset ? Doing something like: if ( $is_a_modif ) { ModBiblioframework( $biblionumber, $frameworkcode ); ModBiblio( $record, $biblionumber, $frameworkcode ); } else { eval { C4::Charset::SetMarcUnicodeFlag( $record, $frameworkcode )}; if ( $@ ){ warn "ERROR when setting Marc unicode flag: " . $@; } else { ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode ); } } where the code we have now is simply like: if ( $is_a_modif ) { ModBiblioframework( $biblionumber, $frameworkcode ); ModBiblio( $record, $biblionumber, $frameworkcode ); } else { ( $biblionumber, $oldbibitemnum ) = AddBiblio( $record, $frameworkcode ); } } Adrien doesn't work anymore at BibLibre. Unassigning this bug to give it more visibility. (In reply to Victor Grousset/tuxayo from comment #2) > Adrien doesn't work anymore at BibLibre. > Unassigning this bug to give it more visibility. Victor, would you be able to verify that the bug still exists? It seems related to UNIMARC as 100 has a different meaning in MARC21. Yes, the error is there and has two variants (depending on new or edited record): Test plan: 1. Have an UNIMARC Koha 2. Create a new record 1. Fill it minimally 2. Put nonsense in 100a 3. save 4. Error Can't call method "metadata" on an undefined value at /kohadevbox/koha/cataloguing/additem.pl line 195 5. Go back and fix the 100a using the plugin 6. Save, it works 7. Edit 8. put nonsense in the 100a 9. save 10. error Unsupported UNIMARC character encoding [] for XML output for UNIMARC; 100$a -> 100a at /usr/share/perl5/MARC/File/XML.pm line 570 |