FIXME in biblio.pm
Good evening, First glitch with 3.06 has appeared: adding an 'item' after importing biblio via z39.50 is functional (it adds the item !!!) but the admin interface gives: Software error: Can't call method "subfield" on an undefined value at /usr/share/koha/lib/C4/Biblio.pm line 3008. Lines 3006-3008 of biblio.pm called from additem.pl: # get title of the record (to store the 10 first letters with the index) my ( $titletag, $titlesubfield ) = GetMarcFromKohaField( 'biblio.title', '' ); # FIXME: should be GetFrameworkCode($biblionumber) ?? $title = lc( $record->subfield( $titletag, $titlesubfield ) ); Before I start looking elsewhere, can someone kindly help me with the use of FIXME comments? tnx and br, Paul
Hi Paul, On Fri, Dec 16, 2011 at 7:09 PM, Paul <paul.a@aandc.org> wrote:
Good evening,
First glitch with 3.06 has appeared: adding an 'item' after importing biblio via z39.50 is functional (it adds the item !!!) but the admin interface gives:
Software error: Can't call method "subfield" on an undefined value at /usr/share/koha/lib/C4/Biblio.**pm line 3008.
Experience has shown that this type of error usually is the result of corrupt data.
Lines 3006-3008 of biblio.pm called from additem.pl:
# get title of the record (to store the 10 first letters with the index) my ( $titletag, $titlesubfield ) = GetMarcFromKohaField( 'biblio.title', '' ); # FIXME: should be GetFrameworkCode($**biblionumber) ?? $title = lc( $record->subfield( $titletag, $titlesubfield ) );
Before I start looking elsewhere, can someone kindly help me with the use of FIXME comments?
FIXME's are notes by devs generally flagging code which works, but could/should be factored differently, etc. This particular FIXME was added by commit 6b9b778b1bc09eeb7d6e982a6fd5420b2209a641 authored by Joe Atzberger. I've not dug into this far enough to know why he thought that GetFrameworkCode might be the better function to use here. If he sees this thread, maybe he can comment. However, I think its safe to say that the error you are experiencing is not related to this FIXME. Kind Regards, Chris
On Fri, Dec 16, 2011 at 10:12 PM, Chris Nighswonger < cnighswonger@foundations.edu> wrote:
Hi Paul,
On Fri, Dec 16, 2011 at 7:09 PM, Paul <paul.a@aandc.org> wrote:
Lines 3006-3008 of biblio.pm called from additem.pl:
# get title of the record (to store the 10 first letters with the index) my ( $titletag, $titlesubfield ) = GetMarcFromKohaField( 'biblio.title', '' ); # FIXME: should be GetFrameworkCode($**biblionumber) ?? $title = lc( $record->subfield( $titletag, $titlesubfield ) );
Before I start looking elsewhere, can someone kindly help me with the use of FIXME comments?
FIXME's are notes by devs generally flagging code which works, but could/should be factored differently, etc.
This particular FIXME was added by commit 6b9b778b1bc09eeb7d6e982a6fd5420b2209a641 authored by Joe Atzberger. I've not dug into this far enough to know why he thought that GetFrameworkCode might be the better function to use here. If he sees this thread, maybe he can comment. However, I think its safe to say that the error you are experiencing is not related to this FIXME.
Based on the commit message it looks like Joe was thinking that the second argument passed to GetMarcFromKohaField might should be populated with the results of GetFrameworkCode($biblionumber). In any case, it is still more likely to be corrupted data than the empty framework parameter passed to GetMarcFromKohaField that is causing your error. Kind Regards, Chris
participants (2)
-
Chris Nighswonger -
Paul