[Bug 40083] New: misc/devel/install_plugins.pl doesn't run the "install" method of plugins.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40083 Bug ID: 40083 Summary: misc/devel/install_plugins.pl doesn't run the "install" method of plugins. Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Command-line Utilities Assignee: koha-bugs@lists.koha-community.org Reporter: arthur.suzuki@biblibre.com QA Contact: testopia@bugs.koha-community.org CC: robin@catalyst.net.nz After a couple tests, it seems that misc/devel/install_plugins.pl doesn't actually run the "install" methods of plugins. -- 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=40083 --- Comment #1 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Managed to get it to work with this diff : ==== diff --git a/Koha/Plugins.pm b/Koha/Plugins.pm index d93e9fe40fc..25aad2ffa2c 100644 --- a/Koha/Plugins.pm +++ b/Koha/Plugins.pm @@ -287,6 +287,7 @@ sub InstallPlugins { try { $plugin = $plugin_class->new({ enable_plugins => $self->{'enable_plugins'} }); + $plugin->install(); } catch { warn "$_" ==== -- 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=40083 --- Comment #2 from Arthur Suzuki <arthur.suzuki@biblibre.com> --- Created attachment 183486 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183486&action=edit Bug 40083: InstallPlugin actually runs "install" method. When developping a plugin or installing from the script rather than zip method, the plugin "install" method is not run. This can result in some necessary component (like tables, configuration) not being setup, resulting in errors at plugin run. Test plan : - Install the kitchensink plugin by cloning the source and adding the directory to "koha-conf.xml" with the plugin_dir configuration - Run misc/devel/install_plugins.pl - Check the plugin table "mytable" is not created in the DB (check the code in the "install" method of kitchensink plugin) - apply patch - run misc/devel/install_plugins.pl again - the plugin table should be created according to the install method. -- 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=40083 Arthur Suzuki <arthur.suzuki@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |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=40083 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40083 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- 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=40083 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183486|0 |1 is obsolete| | --- Comment #3 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 184907 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184907&action=edit Bug 40083: InstallPlugin actually runs "install" method. When developping a plugin or installing from the script rather than zip method, the plugin "install" method is not run. This can result in some necessary component (like tables, configuration) not being setup, resulting in errors at plugin run. Test plan : - Install the kitchensink plugin by cloning the source and adding the directory to "koha-conf.xml" with the plugin_dir configuration - Run misc/devel/install_plugins.pl - Check the plugin table "mytable" is not created in the DB (check the code in the "install" method of kitchensink plugin) - apply patch - run misc/devel/install_plugins.pl again - the plugin table should be created according to the install method. Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- 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=40083 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | CC| |kyle@bywatersolutions.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=40083 Kyle M Hall (khall) <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #4 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- I cannot recreate this issue. I modified a plugin to have the following: sub install { warn "INSTALL"; } When I ran install_plugins.pl, I got the following output: ./misc/devel/install_plugins.pl INSTALL at /kohadevbox/plugins/koha-plugin-rfid/Koha/Plugin/Com/ByWaterSolutions/RFID.pm line 26. Installed RFID version {VERSION} All plugins successfully re-initialised -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org