From 8addd2719a60e1c6e6177b75ef7e2137d6cb9c23 Mon Sep 17 00:00:00 2001 From: Arthur Suzuki Date: Wed, 25 Jun 2025 07:13:57 +0000 Subject: [PATCH] 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. --- Koha/Plugins.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Koha/Plugins.pm b/Koha/Plugins.pm index 598c8152798..fc2f97eb8f8 100644 --- a/Koha/Plugins.pm +++ b/Koha/Plugins.pm @@ -295,6 +295,7 @@ sub InstallPlugins { try { $plugin = $plugin_class->new( { enable_plugins => $self->{'enable_plugins'} } ); + $plugin->install(); } catch { warn "$_"; $failed_instantiation = 1; -- 2.39.5