Bugzilla – Attachment 179001 Details for
Bug 34157
Exporting labels as a barcode range can cause a 500 error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34157: Exporting labels as a barcode range can cause 500 error
Bug-34157-Exporting-labels-as-a-barcode-range-can-.patch (text/plain), 2.31 KB, created by
Hammat wele
on 2025-03-05 17:56:40 UTC
(
hide
)
Description:
Bug 34157: Exporting labels as a barcode range can cause 500 error
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2025-03-05 17:56:40 UTC
Size:
2.31 KB
patch
obsolete
>From 572203249d2e608aa728f3bd7fed3073e8cdde72 Mon Sep 17 00:00:00 2001 >From: Matthias Le Gac <matthias.le-gac@inlibro.com> >Date: Fri, 16 Feb 2024 10:43:18 -0500 >Subject: [PATCH] Bug 34157: Exporting labels as a barcode range can cause 500 > error >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Tadeusz âtadzikâ SoÅnierz <tadeusz@sosnierz.com> >--- > C4/Labels/Label.pm | 8 +++++--- > labels/label-create-pdf.pl | 1 + > 2 files changed, 6 insertions(+), 3 deletions(-) > >diff --git a/C4/Labels/Label.pm b/C4/Labels/Label.pm >index dc77111cf2..cb6f8277b6 100644 >--- a/C4/Labels/Label.pm >+++ b/C4/Labels/Label.pm >@@ -385,8 +385,11 @@ sub draw_label_text { > my $font = $self->{'font'}; > my $item = _get_label_item( $self->{'item_number'} ); > my $label_fields = _get_text_fields( $self->{'format_string'} ); >- my $biblio = Koha::Biblios->find( $item->{biblionumber} ); >- my $record = $biblio->metadata->record; >+ my $biblio = Koha::Biblios->find($item->{'biblionumber'}); >+ my $record; >+ if (defined $biblio) { >+ $record = $biblio->metadata->record; >+ } > > # FIXME - returns all items, so you can't get data from an embedded holdings field. > # TODO - add a GetMarcBiblio1item(bibnum,itemnum) or a GetMarcItem(itemnum). >@@ -408,7 +411,6 @@ LABEL_FIELDS: # process data for requested fields on current label > } else { > $field->{'data'} = _get_barcode_data( $field->{'code'}, $item, $record ); > } >- > # Find appropriate font it oblique title selected, except main font is oblique > if ( ( $field->{'code'} eq 'title' ) and ( $self->{'oblique_title'} == 1 ) ) { > if ( $font =~ /^TB$/ ) { >diff --git a/labels/label-create-pdf.pl b/labels/label-create-pdf.pl >index e6ca44873b..a299d2c6d8 100755 >--- a/labels/label-create-pdf.pl >+++ b/labels/label-create-pdf.pl >@@ -156,6 +156,7 @@ foreach my $item ( @{$items} ) { > ), > ); > $pdf->Add( $label_a->draw_guide_box ) if $layout->get_attr('guidebox'); >+ print STDERR "label_a: iffffffff"; > my $label_a_text = $label_a->create_label(); > _print_text($label_a_text); > ( $row_count, $col_count, $llx, $lly ) = _calc_next_label_pos( $row_count, $col_count, $llx, $lly ); >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 34157
:
162282
|
167338
|
172577
|
179001
|
179002
|
183772
|
183800
|
183801
|
183802