Bugzilla – Attachment 160565 Details for
Bug 35070
Koha plugins implementing "background_jobs" hook can't provide view template
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35070: Fix get_enabled_plugins when database is not created yet
Bug-35070-Fix-getenabledplugins-when-database-is-n.patch (text/plain), 1.51 KB, created by
Julian Maurice
on 2024-01-05 08:07:16 UTC
(
hide
)
Description:
Bug 35070: Fix get_enabled_plugins when database is not created yet
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2024-01-05 08:07:16 UTC
Size:
1.51 KB
patch
obsolete
>From e23f3eb7d9207463836c8486cd8f6e5cbc1f22fb Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 5 Jan 2024 09:04:33 +0100 >Subject: [PATCH] Bug 35070: Fix get_enabled_plugins when database is not > created yet > >Koha::Plugins::get_enabled_plugins is called by Koha::Plugins::call >which is called by C4::Templates->new, which is used in the web >installer when the database is not created yet >--- > Koha/Plugins.pm | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > >diff --git a/Koha/Plugins.pm b/Koha/Plugins.pm >index 4bbfc0c2dc9..72ae308f3ff 100644 >--- a/Koha/Plugins.pm >+++ b/Koha/Plugins.pm >@@ -117,9 +117,16 @@ sub get_enabled_plugins { > unless ($enabled_plugins) { > my $verbose = $params->{verbose} // $class->_verbose; > $enabled_plugins = []; >- my $rs = Koha::Database->schema->resultset('PluginData'); >- $rs = $rs->search({ plugin_key => '__ENABLED__', plugin_value => 1 }); >- my @plugin_classes = $rs->get_column('plugin_class')->all(); >+ >+ my @plugin_classes; >+ try { >+ my $rs = Koha::Database->schema->resultset('PluginData'); >+ $rs = $rs->search({ plugin_key => '__ENABLED__', plugin_value => 1 }); >+ @plugin_classes = $rs->get_column('plugin_class')->all(); >+ } catch { >+ warn "$_"; >+ }; >+ > foreach my $plugin_class (@plugin_classes) { > next unless can_load( modules => { $plugin_class => undef }, verbose => $verbose, nocache => 1 ); > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35070
:
157323
|
159205
|
159248
|
159901
|
159902
|
159938
|
160378
| 160565