Summary: | misc/devel/install_plugins.pl doesn't run the "install" method of plugins. | ||
---|---|---|---|
Product: | Koha | Reporter: | Arthur Suzuki <arthur.suzuki> |
Component: | Command-line Utilities | Assignee: | Bugs List <koha-bugs> |
Status: | Needs Signoff --- | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | robin |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Attachments: | Bug 40083: InstallPlugin actually runs "install" method. |
Description
Arthur Suzuki
2025-06-05 15:12:47 UTC
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 "$_" ==== Created attachment 183486 [details] [review] 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. |