[Bug 8842] New: Plack and tools/holidays.pl
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8842 Priority: P5 - low Change sponsored?: --- Bug ID: 8842 CC: dpavlin@rot13.org Assignee: christophe.croullebois@biblibre.com Summary: Plack and tools/holidays.pl Severity: critical Classification: Unclassified OS: All Reporter: paul.poulain@biblibre.com Hardware: All Status: ASSIGNED Version: master Component: Architecture, internals, and plumbing Product: Koha Saving holidays (at least a range) does not work when you're using Plack. In the logs you see: Variable "$newoperation" is not available at /home/paul/koha.dev/koha-community/tools/newHolidays.pl line 86. Variable "$branchcode" is not available at /home/paul/koha.dev/koha-community/tools/newHolidays.pl line 86. Variable "$weekday" is not available at /home/paul/koha.dev/koha-community/tools/newHolidays.pl line 86. Variable "$day" is not available at /home/paul/koha.dev/koha-community/tools/newHolidays.pl line 86. Variable "$month" is not available at /home/paul/koha.dev/koha-community/tools/newHolidays.pl line 86. Variable "$year" is not available at /home/paul/koha.dev/koha-community/tools/newHolidays.pl line 86. Variable "$title" is not available at /home/paul/koha.dev/koha-community/tools/newHolidays.pl line 86. Variable "$description" is not available at /home/paul/koha.dev/koha-community/tools/newHolidays.pl line 86. Variable "@holiday_list" is not available at /home/paul/koha.dev/koha-community/tools/newHolidays.pl line 117. Use of uninitialized value $sessiontype in string eq at /home/paul/koha.dev/koha-community/C4/Auth.pm line 705. It means there is a sub that uses a variable that is global. When you use Plack, your script is "wrapped" into a larger sub. So all global variable become local and the $newoperation are no more available. The probable solution is to replace ($newoperation, $branchcode, $weekday, $day, $month, $year, $title, $description) = @_; by my ($newoperation, $branchcode, $weekday, $day, $month, $year, $title, $description) = @_; -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8842 --- Comment #1 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 13186 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13186&action=edit Bug 8842 fix Plack scoping for holidays the internal sub add_holiday uses some variables that are defined in the main script, usual fix -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8842 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Assignee|christophe.croullebois@bibl |paul.poulain@biblibre.com |ibre.com | Severity|critical |blocker --- Comment #2 from Paul Poulain <paul.poulain@biblibre.com> --- Upgrading severity, it's a Blocker for Plack users -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8842 --- Comment #3 from Paul Poulain <paul.poulain@biblibre.com> --- Created attachment 13187 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13187&action=edit Bug 8842 fix Plack scoping in acquisition basket.pl has a local sub get_order_infos that require our-ing the $basketno variable Note that I had no problem with this variable. It may be some dead code, but I couldn't be sure it is, so I just switched basketno to "our" neworderempty.pl has 2 local sub that require our-ing some variables: subs MARCfindbreeding and Load_Duplicate -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8842 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13187|0 |1 is obsolete| | --- Comment #4 from Paul Poulain <paul.poulain@biblibre.com> --- Comment on attachment 13187 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13187 Bug 8842 fix Plack scoping in acquisition oops... wrong bug, it's 8892, not 8842. Will attach this one to the correct bug -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8842 Jared Camins-Esakov <jcamins@cpbibliography.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=8842 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #13186|0 |1 is obsolete| | --- Comment #5 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- Created attachment 13199 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=13199&action=edit Bug 8842 fix Plack scoping for holidays the internal sub add_holiday uses some variables that are defined in the main script, usual fix Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8842 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |jonathan.druart@biblibre.co | |m QA Contact| |jonathan.druart@biblibre.co | |m --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- QA Comment: This patch fixes the issue using plack and does not introduce regression. Marked as Passed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8842 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #7 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8842 --- Comment #8 from Paul Poulain <paul.poulain@biblibre.com> --- Patch pushed to branch 3.10.x -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8842 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|master |3.10 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8842 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |RESOLVED CC| |chris@bigballofwax.co.nz Resolution|--- |FIXED --- Comment #9 from Chris Cormack <chris@bigballofwax.co.nz> --- Released in 3.10.0 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org