Bugzilla – Attachment 189636 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.66 KB, created by
Martin Renvoize (ashimema)
on 2025-11-17 16:36:40 UTC
(
hide
)
Description:
Bug 38384: Trigger plugin modules loading as soon as possible in Koha
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-11-17 16:36:40 UTC
Size:
1.66 KB
patch
obsolete
>From 8b7101ab4d1e67d5ca753d36081e4646587bfc08 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 > >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > 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 1b4a9bf82bb..88ea0649c98 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.51.1
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