[Koha-bugs] [Bug 29697] Replace GetMarcBiblio occurrences with $biblio->metadata->record

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Jun 13 09:33:14 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29697

--- Comment #81 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
(In reply to Joonas Kylmälä from comment #80)
> I found another problem, after this patch the zebra rebuild doesn't work:
> 
> root at kohadevbox:koha(master)$ koha-shell kohadev
> $ perl misc/migration_tools/rebuild_zebra.pl -b
> error retrieving biblio 369 at misc/migration_tools/rebuild_zebra.pl line
> 689.

It is actually fixing a bug :)

Biblio 369 has a bad MARCXML, and so code is expecting this warning (before and
after this patch):

        eval {
            my $biblio = Koha::Biblios->find($record_number);
            $marc = $biblio->metadata->record({ embed_items => 1 }); 
        };
        if ($@ || !$marc) {
            # here we do warn since catching an exception
            # means that the bib was found but failed
            # to be parsed
            warn "error retrieving biblio $record_number";
            return;
        }

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list