Created attachment 4174 [details] [review] Correct a formatting problem in the pdf generation of basketgroup.pl In /acqui/basketgroup.pl : When printing an order form for a basketgroup, some items appeared incorrectly in the resulting pdf file. The formatting problem happens if $ord->{itemtype} has a value, but $bib->{itemtype} does not. Patch attached to correct this problem.
More details : The formatting problem happens when a biblioitem has an itemtype that doesn't exist in the itemtypes table.
Frederic (without a k :)) Did you miss sending or attaching the signed off patch?
Created attachment 4960 [details] [review] proposed patch (passed QA) QA comment * seems Frédéric D. signed-off patch has been lost in limbo * tested the patch, works as expected & fixes the problem Marking "passed QA"
Pushed, please test
At the moment pdf printing seems to be broken for me, so I can't close this bug yet. The pdf files I create have following text inside: <h1>Software error:</h1> <pre>Undefined subroutine &main::printpdf called at /home/katrin/kohaclone/acqui/basketgroup.pl line 275. </pre> Investigating...
(In reply to comment #5) > At the moment pdf printing seems to be broken for me, so I can't close this bug > yet. The pdf files I create have following text inside: > > <h1>Software error:</h1> > <pre>Undefined subroutine &main::printpdf called at > /home/katrin/kohaclone/acqui/basketgroup.pl line 275. > </pre> > > Investigating... The problem appeared in 3.6. See Bug 7138 .
The line 275 shows : my $pdf = printpdf($basketgroup, $bookseller, $baskets, \%orders, $bookseller->{gstrate} // C4::Context->preference("gist")) || die "pdf generation failed"; printpdf is supposed to be loaded at line 190 : my $pdfformat = C4::Context->preference("OrderPdfFormat"); if ($pdfformat eq 'pdfformat::layout3pages' || $pdfformat eq 'pdfformat::layout2pages'){ eval { require $pdfformat; import $pdfformat; }; So, what does OrderPdfFormat contains ? If it's not pdfformat::layout3pages or pdfformat::layout2pages, nothing is "require-ed", and printpdf fails
Paul, plz also check 7138. I have tested entering nothing or a wrong value in the system preference. The browser shows a nice error message in this case now.
yikes. The "depends on" link is really not visible enough, I missed it (once again), thx kf. patch 7138 pushed, this one can be tested now I think
I set biblioitems.itype to an invalid value. PDF still printing correctly.