Bugzilla – Attachment 192662 Details for
Bug 38384
General fix for plugins breaking database transactions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38384: Trigger plugin modules loading as soon as possible in Koha
Bug-38384-Trigger-plugin-modules-loading-as-soon-a.patch (text/plain), 1.92 KB, created by
Andrew Fuerste-Henry
on 2026-02-06 20:58:41 UTC
(
hide
)
Description:
Bug 38384: Trigger plugin modules loading as soon as possible in Koha
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2026-02-06 20:58:41 UTC
Size:
1.92 KB
patch
obsolete
>From 9b9df102be4d5ecf39dfd05bf57555c4be5a4338 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Thu, 7 Nov 2024 06:53:39 -0500 >Subject: [PATCH] Bug 38384: Trigger plugin modules loading as soon as possible > in Koha >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> >--- > C4/Context.pm | 7 ++++++- > Koha/BackgroundJob.pm | 6 ------ > 2 files changed, 6 insertions(+), 7 deletions(-) > >diff --git a/C4/Context.pm b/C4/Context.pm >index 6c51b3b862c..6481c1f4376 100644 >--- a/C4/Context.pm >+++ b/C4/Context.pm >@@ -22,7 +22,12 @@ use Modern::Perl; > use vars qw($AUTOLOAD $context); > > BEGIN { >- if ( $ENV{'HTTP_USER_AGENT'} ) { # Only hit when plack is not enabled >+ # Calling get_enabled_plugins here esnures that all plugin >+ # modules are loaded before use and will not trigger >+ # a database connection reset >+ Koha::Plugins->get_enabled_plugins(); >+ >+ if ( $ENV{'HTTP_USER_AGENT'} ) { # Only hit when plack is not enabled > > # Redefine multi_param if cgi version is < 4.08 > # Remove the "CGI::param called in list context" warning in this case >diff --git a/Koha/BackgroundJob.pm b/Koha/BackgroundJob.pm >index 0ff204281d6..b0c084a6c5e 100644 >--- a/Koha/BackgroundJob.pm >+++ b/Koha/BackgroundJob.pm >@@ -189,12 +189,6 @@ sub process { > > return {} if ref($self) ne 'Koha::BackgroundJob'; > >- # Our background jobs are called in forked processes >- # to ensure we have all plugin hooks and data we call >- # get_enabled_plugins at the star of processing >- # to populate the cache >- Koha::Plugins->get_enabled_plugins(); >- > my $derived_class = $self->_derived_class; > > $args ||= {}; >-- >2.39.5
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 38384
:
174150
|
174264
|
174265
|
174280
|
174282
|
189636
|
189637
|
189638
|
189639
|
189640
|
190514
|
190515
|
190516
|
190517
|
191860
|
192119
|
192628
|
192629
|
192630
|
192631
|
192632
|
192633
|
192662
|
192663
|
192664
|
192665
|
192666
|
192667
|
193142
|
193143
|
193144
|
193171
|
193172
|
193173
|
193174
|
193175
|
193176
|
193177
|
193178
|
193179