[Bug 27820] New: plugins_nightly.pl script fails with: Undefined subroutine &main::cronlogaction
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Bug ID: 27820 Summary: plugins_nightly.pl script fails with: Undefined subroutine &main::cronlogaction Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Plugin architecture Assignee: koha-bugs@lists.koha-community.org Reporter: solaris.smoke@gmail.com QA Contact: testopia@bugs.koha-community.org The new plugins_nightly.pl script that was introduced in Koha 20.11.03 doesn't work - it fails with the following error: /etc/cron.daily/koha-common: Undefined subroutine &main::cronlogaction called at /usr/share/koha/bin/cronjobs/plugins_nightly.pl line 8. The issue appears to be a missing import - from looking at other files that use cronlogaction, the following is missing from this file: use C4::Log; -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |25245 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25245 [Bug 25245] Add a plugin hook to allow running code on a nightly basis -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Samir Shah <solaris.smoke@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |solaris.smoke@gmail.com --- Comment #1 from Samir Shah <solaris.smoke@gmail.com> --- Created attachment 117427 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117427&action=edit Fix missing import in plugins_nightly.pl -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Samir Shah <solaris.smoke@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch --- Comment #2 from Samir Shah <solaris.smoke@gmail.com> --- I've added a patch that I think resolves the issue. I'm not familiar enough with Perl to be able to contribute more (e.g., tests, if required). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |fridolin.somers@biblibre.co | |m --- Comment #3 from Fridolin Somers <fridolin.somers@biblibre.com> --- Good catch, I set status to need signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 --- Comment #4 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 117435 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117435&action=edit Bug 27820: fix missing import in plugins_nightly.pl Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- Created attachment 117436 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117436&action=edit Bug 27820: add all missing use in misc/cronjobs/plugins_nightly.pl Koha::Plugins and C4::Context where missing. Try::Tiny was missing for try/catch. Test plan : 1) Use a plugin using hook 'cronjob_nightly' 2) Run script : misc/cronjobs/plugins_nightly.pl -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|plugins_nightly.pl script |plugins_nightly.pl script |fails with: Undefined |missing use |subroutine | |&main::cronlogaction | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 --- Comment #6 from Fridolin Somers <fridolin.somers@biblibre.com> --- Piouf nearly all use where missing :D In order to test, I've added a pull request on KitchenSink Koha plugin : https://github.com/bywatersolutions/dev-koha-plugin-kitchen-sink/pull/15 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117427|0 |1 is obsolete| | --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Comment on attachment 117427 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117427 Fix missing import in plugins_nightly.pl I've signed first patch and created a second one that needs signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |kyle@bywatersolutions.com, | |tomascohen@gmail.com Assignee|koha-bugs@lists.koha-commun |fridolin.somers@biblibre.co |ity.org |m --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Please test this carefully. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117435|0 |1 is obsolete| | Attachment #117436|0 |1 is obsolete| | --- Comment #9 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 118111 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118111&action=edit Bug 27820: fix missing import in plugins_nightly.pl Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 --- Comment #10 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 118112 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118112&action=edit Bug 27820: add all missing use in misc/cronjobs/plugins_nightly.pl Koha::Plugins and C4::Context where missing. Try::Tiny was missing for try/catch. Test plan : 1) Use a plugin using hook 'cronjob_nightly' 2) Run script : misc/cronjobs/plugins_nightly.pl Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118111|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118113 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118113&action=edit Bug 27820: fix missing import in plugins_nightly.pl Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #118112|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 118114 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118114&action=edit Bug 27820: add all missing use in misc/cronjobs/plugins_nightly.pl Koha::Plugins and C4::Context where missing. Try::Tiny was missing for try/catch. Test plan : 1) Use a plugin using hook 'cronjob_nightly' 2) Run script : misc/cronjobs/plugins_nightly.pl Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I had been avoiding QAing this one as I clearly made the mistakes in the first place.. but as no-one else is taking it on I thought I'd give it a spin. Tested using the Kitchensink merge request as added by Fridolin. All works as expected. Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |21.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 --- Comment #14 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Pushed to master for 21.05, thanks to everybody involved! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 --- Comment #15 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Congratulations Samir for your first patch pushed! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|21.05.00 |21.05.00,20.11.04 released in| | --- Comment #16 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 20.11.x for 20.11.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27820 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com Status|Pushed to stable |RESOLVED Resolution|--- |FIXED --- Comment #17 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Missing dependency, not backported to 20.05 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org