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;
Created attachment 117427 [details] [review] Fix missing import in plugins_nightly.pl
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).
Good catch, I set status to need signoff
Created attachment 117435 [details] [review] Bug 27820: fix missing import in plugins_nightly.pl Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Created attachment 117436 [details] [review] 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
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
Comment on attachment 117427 [details] [review] Fix missing import in plugins_nightly.pl I've signed first patch and created a second one that needs signoff
Please test this carefully.
Created attachment 118111 [details] [review] 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>
Created attachment 118112 [details] [review] 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>
Created attachment 118113 [details] [review] 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>
Created attachment 118114 [details] [review] 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>
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
Pushed to master for 21.05, thanks to everybody involved!
Congratulations Samir for your first patch pushed!
Pushed to 20.11.x for 20.11.04
Missing dependency, not backported to 20.05