Browse Source

error 500 when record cannot be loaded

On a basket or a basket download, or csv export, if Koha cannot get a biblio, then it failed with error 500.
This patch fixes that behaviour skipping the faulty record in order to present the user with the biblios which are not causing trouble.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
3.2.x
Henri-Damien LAURENT 14 years ago
committed by Galen Charlton
parent
commit
6e0c124c9c
  1. 2
      C4/Record.pm
  2. 1
      opac/opac-basket.pl
  3. 1
      opac/opac-downloadcart.pl
  4. 1
      opac/opac-downloadshelf.pl

2
C4/Record.pm

@ -362,7 +362,7 @@ sub marcrecord2csv {
# Getting the record
my $record = GetMarcBiblio($biblio);
next unless $record;
# Getting the framework
my $frameworkcode = GetFrameworkCode($biblio);

1
opac/opac-basket.pl

@ -62,6 +62,7 @@ foreach my $biblionumber ( @bibs ) {
my $dat = &GetBiblioData($biblionumber);
my $record = &GetMarcBiblio($biblionumber);
next unless $record;
my $marcnotesarray = GetMarcNotes( $record, $marcflavour );
my $marcauthorsarray = GetMarcAuthors( $record, $marcflavour );
my $marcsubjctsarray = GetMarcSubjects( $record, $marcflavour );

1
opac/opac-downloadcart.pl

@ -66,6 +66,7 @@ if ($bib_list && $format) {
foreach my $biblio (@bibs) {
my $record = GetMarcBiblio($biblio);
next unless $record;
switch ($format) {
case "iso2709" { $output .= $record->as_usmarc(); }

1
opac/opac-downloadshelf.pl

@ -70,6 +70,7 @@ if ($shelfid && $format) {
my $biblionumber = $biblio->{biblionumber};
my $record = GetMarcBiblio($biblionumber);
next unless $record;
switch ($format) {
case "iso2709" { $output .= $record->as_usmarc(); }

Loading…
Cancel
Save