[Koha] Can't call method "subfield" error

nreese nicholas.reese at ffa.int
Thu Aug 4 12:08:56 NZST 2011


Hi all,

I have searched for an answer for this - a lot of people seem to discuss
this type of error, but there is no answer to what the problem actually
means.

I have a vanilla install of 3.4.02 on openSuse 11.4. Everything seems to
work fine, until we try to commit the data to to the database, and we get
the following error:

Can't call method "subfield" on an undefined value at
/usr/share/koha/lib/C4/Biblio.pm line 2835

This is the code in Bilblio.pm :

    # Get the indexes
    my %index;
    my $title;
    if ( $server eq 'biblioserver' ) {
        %index = GetNoZebraIndexes;

        # 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 ) ); 
*THIS IS LINE 2835*
    } else {

        # warn "server : $server";
        # for authorities, the "title" is the $a mainentry
        my ( $auth_type_tag, $auth_type_sf ) =
C4::AuthoritiesMarc::get_auth_type_location();
        my $authref = C4::AuthoritiesMarc::GetAuthType( $record->subfield(
$auth_type_tag, $auth_type_sf ) );
        warn "ERROR : authtype undefined for " . $record->as_formatted
unless $authref;
        $title = $record->subfield( $authref->{auth_tag_to_report}, 'a' );
        $index{'mainmainentry'} = $authref->{auth_tag_to_report} . 'a';
        $index{'mainentry'}     = $authref->{auth_tag_to_report} . '*';
        $index{'auth_type'}     = "${auth_type_tag}${auth_type_sf}";
    }

Cheers,

Nick

--
View this message in context: http://koha.1045719.n5.nabble.com/Can-t-call-method-subfield-error-tp4664643p4664643.html
Sent from the Koha - Discuss mailing list archive at Nabble.com.


More information about the Koha mailing list