Summary: | Error when adding label layout under plack | ||
---|---|---|---|
Product: | Koha | Reporter: | Mirko Tietgen <mirko> |
Component: | Label/patron card printing | Assignee: | Paul Poulain <paul.poulain> |
Status: | CLOSED FIXED | QA Contact: | Jonathan Druart <jonathan.druart> |
Severity: | blocker | ||
Priority: | P5 - low | CC: | chris, cnighswonger, jonathan.druart, paul.poulain |
Version: | 3.10 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 8490 fixing Plack error
Bug 8490: fix Plack error when creating label layout |
Description
Mirko Tietgen
2012-07-21 14:14:52 UTC
Chris_n => THIS IS FOR YOU ! I think I've understood why the problem occurs: the $layout_id variable is set to 5001 on my setup. And 5001 is the Unix port where I run Plack. WTH is this value stored in this variable ? Because of my $layout_id = $cgi->param('layout_id') || $cgi->param('element_id') || $ARGV[1] || ''; in label-edit-layout.pl Removing $ARGV[1] solves the problem Why is the ARGV[1] here, I have no idea. Is this script sometimes run from commandline ? I don't think so. This ||ARGV[1] has been added by chris_n in the commit : 12663796ca87cf87f89fd1ba1f2949ec33b76b85 Auteur: Chris Nighswonger <cnighswonger@foundations.edu> 2009-07-20 19:24:49 [8/40] Adding new layout management page This moves the layouts off of the labels tool start page to bring it into conformity with the other parts of this tool. assigning bug to me, and adding chris_n in cc: Created attachment 13197 [details] [review] Bug 8490 fixing Plack error This patch fixes "Error message "Can't bless non-reference value at /home/pi/koha/C4/Creators/Layout.pm line 111." when trying to add a label layout while using plack." The $layout_id variable is set to 5001 on my setup. And 5001 is the Unix port where I run Plack. WTH is this value stored in this variable ? Because of my $layout_id = $cgi->param('layout_id') || $cgi->param('element_id') || $ARGV[1] || ''; in label-edit-layout.pl Removing $ARGV[1] solves the problem Also removing $ARG[0] because I also don't think it's useful Upgrading severity because there's no workaround, it's a blocker to use Plack (In reply to comment #2) > Removing $ARGV[1] solves the problem > Also removing $ARG[0] because I also don't think it's useful You're right about the cli args, Paul. In this script they were there for my debugging very early on and should have been removed. No functionality should be broken by removing them. IIRC this may not be true for all of the label/patron card related scripts, however. Ie. those that generate the PDF, CSV, etc. files from batches, etc. Created attachment 13208 [details] [review] Bug 8490: fix Plack error when creating label layout This patch fixes "Error message "Can't bless non-reference value at /home/pi/koha/C4/Creators/Layout.pm line 111." when trying to add a label layout while using plack." The $layout_id variable is set to 5001 on my setup. And 5001 is the Unix port where I run Plack. WTH is this value stored in this variable ? Because of > my $layout_id = $cgi->param('layout_id') || $cgi->param('element_id') || $ARGV[1] || ''; in label-edit-layout.pl Removing $ARGV[1] solves the problem Also removing $ARG[0] because I also don't think it's useful Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Signed off after confirming with Chris Nighswonger that these scripts were not intended to be run from the command line. Works as promised. QA Comment: No regression introduced with this patch. So I mark it as Passed QA. This patch has been pushed to master. Patch pushed to branch 3.10.x Released in 3.10.0 |