[Bug 7138] New: Can't print basket group order pdf.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 Bug #: 7138 Summary: Can't print basket group order pdf. Classification: Unclassified Change sponsored?: --- Product: Koha Version: rel_3_6 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P5 Component: Acquisitions AssignedTo: henridamien@koha-fr.org ReportedBy: fcapovilla@live.ca QAContact: koha-bugs@lists.koha-community.org When trying to print a basket group as a pdf file, an invalid pdf file is returned. The returned file contains this error : Undefined subroutine &main::printpdf called at /home/koha/kohagit/acqui/basketgroup.pl line 275. The problem seems to happen because pdfformat::layout3pages doesn't load correctly on line 190 of basketgroup.pl. It's in an eval and the warnings are ignored. A possible way to fix the problem would be to put require and import inside of evals : eval "require $pdfformat"; eval "import $pdfformat"; -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de Severity|normal |critical --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2011-11-02 22:14:12 UTC --- I can confirm this bug, updating severity! -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> 2011-11-02 23:54:07 UTC --- Created attachment 6153 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6153 Bug 7138: Can't print basket group order pdf PDF print of basket groups is broken. To test: 1) Make sure OrderPdfFormat is set to pdfformat::layout2pages or pdfformat::layout3pages 2) Create a basket with orders 3) Close the basket and create a basket group checking the checkbox 4) Print the basket group as PDF Before patch the file is broken and when opened in an editor contains an error message. After the patch the PDF should be generated correctly again. Thx to Chris for helping me to fix the problem. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 |PATCH-Sent Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6153|0 |1 is obsolete| | --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> 2011-11-03 02:31:50 UTC --- Created attachment 6154 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6154 Bug 7138: Can't print basket group order pdf PDF print of basket groups is broken. To test: 1) Make sure OrderPdfFormat is set to pdfformat::layout2pages or pdfformat::layout3pages 2) Create a basket with orders 3) Close the basket and create a basket group checking the checkbox 4) Print the basket group as PDF Before patch the file is broken and when opened in an editor contains an error message. After the patch the PDF should be generated correctly again. Thx to Chris for helping me to fix the problem. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz Patch Status|Needs Signoff |Signed Off -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |6369 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6154|0 |1 is obsolete| | --- Comment #4 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-11-03 09:02:08 UTC --- Created attachment 6161 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6161 Signed patch -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6161|0 |1 is obsolete| | --- Comment #5 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-11-03 09:03:34 UTC --- Created attachment 6162 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6162 Signed patch Oops, wrong file. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |m.de.rooy@rijksmuseum.nl Version|rel_3_6 |master Patch Status|Signed Off |Passed QA AssignedTo|henridamien@koha-fr.org |katrin.fischer@bsz-bw.de Severity|critical |major --- Comment #6 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-11-03 09:06:55 UTC --- QA: Combined require and import into use. Added a warn statement. Solves the actual problem of printing PDF. But we still have several warnings in the logfile. Such as: [Thu Nov 03 09:52:28 2011] [error] [client 192.87.126.61] [Thu Nov 3 09:52:28 2011] basketgroup.pl: Use of uninitialized value in multiplication (*) at /usr/share/koha/testclone/acqui/basketgroup.pl line 246., referer: http://libdevelop.rijksmuseum.nl:8009/cgi-bin/koha/acqui/basketgroup.pl?book... [Thu Nov 03 09:52:28 2011] [error] [client 192.87.126.61] [Thu Nov 3 09:52:28 2011] basketgroup.pl: Use of uninitialized value in join or string at pdfformat/layout2pages.pm line 192., referer: http://libdevelop.rijksmuseum.nl:8009/cgi-bin/koha/acqui/basketgroup.pl?book... [Thu Nov 03 09:52:28 2011] [error] [client 192.87.126.61] [Thu Nov 3 09:52:28 2011] basketgroup.pl: Use of uninitialized value in join or string at pdfformat/layout2pages.pm line 230., referer: http://libdevelop.rijksmuseum.nl:8009/cgi-bin/koha/acqui/basketgroup.pl?book... [Thu Nov 03 09:52:28 2011] [error] [client 192.87.126.61] [Thu Nov 3 09:52:28 2011] basketgroup.pl: Use of uninitialized value in concatenation (.) or string at pdfformat/layout2pages.pm line 94., referer: http://libdevelop.rijksmuseum.nl:8009/cgi-bin/koha/acqui/basketgroup.pl?book... -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 --- Comment #7 from Chris Cormack <chris@bigballofwax.co.nz> 2011-11-03 09:24:33 UTC --- I don't think we should edit someones patch, and leave their name as the committer. If a follow up is needed, do that, or a counter patch. But editing someones work and leaving it under their name isn't right. This will fail perl::critic tests again now also not ok 5 - Test::Perl::Critic for "acqui/basketgroup.pl" # Failed test 'Test::Perl::Critic for "acqui/basketgroup.pl"' # at /usr/share/perl5/Test/Perl/Critic.pm line 110. # # Perl::Critic found these violations in "acqui/basketgroup.pl": # Expression form of "eval" at line 189, column 9. See page 161 of PBP. (Severity: 5) -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch Status|Passed QA |Signed Off --- Comment #8 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-11-03 09:26:04 UTC --- OK. Setting status back. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6162|0 |1 is obsolete| | -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6154|1 |0 is obsolete| | -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 --- Comment #9 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-11-03 09:32:25 UTC --- I restored Chris patch for this report and made my addition obsolete. I just have two points at the code: 1) The construction with an eval require within an eval, followed by the import does not really look great. Apparently, it does not conflict with perl critic. 2) An empty if($@) {} after these lines could be corrected by this patch too. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 --- Comment #10 from Chris Cormack <chris@bigballofwax.co.nz> 2011-11-03 09:36:34 UTC --- Heh, it's not my patch, its Katrin's I just signed off on it :) And by changing it, i'd now signed off on yours without even seeing it .. which is pretty tricky of me :) Yep a follow up with a warn wouldn't be a bad thing. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 --- Comment #11 from M. de Rooy <m.de.rooy@rijksmuseum.nl> 2011-11-03 09:59:27 UTC --- (In reply to comment #10)
Heh, it's not my patch, its Katrin's I just signed off on it :) True of course. And by changing it, i'd now signed off on yours without even seeing it .. which is pretty tricky of me :) Clear. I would only change a patch this way if it is quite trivial. Which seemed to me the case here. But no problem.
Just checking the perl critic thing: Where I wrote: "Apparently, it does not conflict with perl critic.", I now see that the original patch just violates the same rule of stringy eval. So, maybe it should be solved differently.. -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.poulain@biblibre.com Patch Status|Signed Off |Patch Pushed Severity|major |blocker --- Comment #12 from Paul Poulain <paul.poulain@biblibre.com> 2011-11-09 16:17:57 UTC --- This one is not MAJ, it's BLO : the pdf can't be printed anymore and there is no way to do it another way. * upgrading severity * tested the patch, the problem is now fixed * passed perlcritic * QA comment: none, it's a 2 line patch. I just don't understand why we need eval{ eval ... }} as Marcel noticed in comment * I apply the patch, but a follow-up would be usefull to fix the warnings in the logs (but it's not related to this bug So, patch pushed, please test -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |rel_3_6 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA Contact for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7138 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent (DO NOT USE) |P2 Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are the QA Contact for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org