[Bug 14122] New: Patron card: Software error when creating using borrower_number as parameter from URL
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 Bug ID: 14122 Summary: Patron card: Software error when creating using borrower_number as parameter from URL Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Label/patron card printing Assignee: cnighswonger@foundations.edu Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org Use case: Add link to directly print a patron card from the patron's detail page. This could be done using a URL like the following: ...cgi-bin/koha/patroncards/create-pdf.pl?borrower_number=61&template_id=24&layout_id=21&start_card=1 To test, replace the values for borrower_number, temlate_id and layout_id to something that exists in your system. The URL leads to a software error: Can't use an undefined value as a HASH reference at /usr/share/kohaclone/patroncards/create-pdf.pl line 118. Reason: Line 92: push(@{$items}, {item_number => $_}); should read: push(@{$items}, {borrower_number => $_}); Patch follows. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |veron@veron.ch |y.org | See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=7915 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 38772 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38772&action=edit Bug 14122 - Patron card: Software error when creating using borrower_number as parameter from URL To test prepare an URL like the following: ...cgi-bin/koha/patroncards/create-pdf.pl?borrower_number=61&template_id=24&layout_id=21&start_card=1 Change the values for borrower_number, template_id and layout_id to something that exists in your system. Without patch, the URL leads to a software error: Can't use an undefined value as a HASH reference at /usr/share/kohaclone/patroncards/create-pdf.pl line 118. With patch, a PDF with the patron card is created. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- (In reply to Marc Véron from comment #1)
Change the values for borrower_number, template_id and layout_id to something that exists in your system.
Are you going to submit a bug report for the case that they don't? <h1>Software error:</h1> <pre>Can't bless non-reference value at /home/mtompset/kohaclone/C4/Creators/Layout.pm line 111. </pre> <p> For help, please send mail to the webmaster (<a href="mailto:webmaster@debian">webmaster@debian</a>), giving this error message and the time and date of the error. </p> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 --- Comment #3 from Marc Véron <veron@veron.ch> ---
Are you going to submit a bug report for the case that they don't?
Maybe I do not understand your question, but: No, for the case that they do... In my example I want to print a patron card for borrower 61 with template 24 and layout 21. This fails without patch and works fine with patch. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff --- Comment #4 from Marc Véron <veron@veron.ch> --- Ho, forgot to set to Needs Signoff... -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38772|0 |1 is obsolete| | --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 38813 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38813&action=edit Bug 14122 - Patron card: Software error when creating using borrower_number as parameter from URL To test prepare an URL like the following: ...cgi-bin/koha/patroncards/create-pdf.pl?borrower_number=61&template_id=24&layout_id=21&start_card=1 Change the values for borrower_number, template_id and layout_id to something that exists in your system. Without patch, the URL leads to a software error: Can't use an undefined value as a HASH reference at /usr/share/kohaclone/patroncards/create-pdf.pl line 118. With patch, a PDF with the patron card is created. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> NOTE: This does NOT deal with the case where borrowernumber, template_id, or layout_id are invalid. This only deals with the case where they do exist. Invalid borrowernumber still gives same error. Invalid template_id or layout_id gives error on line 111. Those are beyond the scope of this bug. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 --- Comment #6 from Chris Nighswonger <cnighswonger@foundations.edu> --- (In reply to M. Tompsett from comment #5)
NOTE: This does NOT deal with the case where borrowernumber, template_id, or layout_id are invalid. This only deals with the case where they do exist.
Invalid borrowernumber still gives same error. Invalid template_id or layout_id gives error on line 111. Those are beyond the scope of this bug.
If you don't mind, go ahead and open a bug for this. create-pdf.pl and friends should handle this gracefully. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14138 See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=14138 QA Contact|veron@veron.ch |testopia@bugs.koha-communit | |y.org Assignee|cnighswonger@foundations.ed |veron@veron.ch |u | --- Comment #7 from Marc Véron <veron@veron.ch> --- I was about to open Bug 14138... (Oh, it seems that I mistaked by setting Assignee...) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #38813|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 38828 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38828&action=edit [PASSED QA] Bug 14122 - Patron card: Software error when creating using borrower_number as parameter from URL To test prepare an URL like the following: ...cgi-bin/koha/patroncards/create-pdf.pl?borrower_number=61&template_id=24&layout_id=21&start_card=1 Change the values for borrower_number, template_id and layout_id to something that exists in your system. Without patch, the URL leads to a software error: Can't use an undefined value as a HASH reference at /usr/share/kohaclone/patroncards/create-pdf.pl line 118. With patch, a PDF with the patron card is created. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> NOTE: This does NOT deal with the case where borrowernumber, template_id, or layout_id are invalid. This only deals with the case where they do exist. Invalid borrowernumber still gives same error. Invalid template_id or layout_id gives error on line 111. Those are beyond the scope of this bug. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Nice! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Marc! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14122 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |chris@bigballofwax.co.nz --- Comment #10 from Chris Cormack <chris@bigballofwax.co.nz> --- Pushed to 3.18.x will be 3.18.7 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org