Description
Marc Véron
2015-05-02 19:44:34 UTC
Created attachment 38772 [details] [review] 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. (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>
> 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.
Ho, forgot to set to Needs Signoff... Created attachment 38813 [details] [review] 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. (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. I was about to open Bug 14138... (Oh, it seems that I mistaked by setting Assignee...) Created attachment 38828 [details] [review] [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! Patch pushed to master. Thanks Marc! Pushed to 3.18.x will be 3.18.7 |