From 89d18796ff6917ded4215e955673c4c38ec19825 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 8 Dec 2023 10:58:00 +0000 Subject: [PATCH] Bug 35507: Clear cache key for enabled plugins at deletion Content-Type: text/plain; charset=utf-8 KitchenSink is still in cache key and causes other tests to fail. Test plan: Install some after_biblio_action plugin. Delete the plugin without this patch. Run t/db_dependent/TestBuilder.t [FAIL] Delete plugin with this patch Run t/db_dependent/TestBuilder.t [PASS] --- Koha/Plugins/Handler.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Koha/Plugins/Handler.pm b/Koha/Plugins/Handler.pm index a32487d4ad..1e4005517e 100644 --- a/Koha/Plugins/Handler.pm +++ b/Koha/Plugins/Handler.pm @@ -101,6 +101,9 @@ sub delete { enable_plugins => $args->{enable_plugins}, }); + # Clear cache too for get_enabled_plugins + Koha::Cache::Memory::Lite->get_instance->clear_from_cache( Koha::Plugins::ENABLED_PLUGINS_CACHE_KEY() ); + C4::Context->dbh->do( "DELETE FROM plugin_data WHERE plugin_class = ?", undef, ($plugin_class) ); Koha::Plugins::Methods->search({ plugin_class => $plugin_class })->delete(); -- 2.30.2