Bugzilla – Attachment 193325 Details for
Bug 36542
In C4/AddBiblio, plugin hook after_biblio_action is triggered before the record is actually saved
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36542: after_biblio_action plugin hook is now called after the dbx transaction is finished
7ce5efb.patch (text/plain), 1.73 KB, created by
Kyle M Hall (khall)
on 2026-02-17 15:07:51 UTC
(
hide
)
Description:
Bug 36542: after_biblio_action plugin hook is now called after the dbx transaction is finished
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2026-02-17 15:07:51 UTC
Size:
1.73 KB
patch
obsolete
>From 7ce5efb04c5e703bae28e9376649a41b3f651c42 Mon Sep 17 00:00:00 2001 >From: Arthur Suzuki <arthur.suzuki@biblibre.com> >Date: Wed, 10 Apr 2024 12:03:08 +0200 >Subject: [PATCH] Bug 36542: after_biblio_action plugin hook is now called > after the dbx transaction is finished > >To reproduce : >1) Install a plugin which uses the biblionumber of a created record in the "after_biblio_action". >2) Verify the biblionumber is missing > >This is because the call to the hooks is done before the DB transaction is actually done (in AddBiblio function). > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > C4/Biblio.pm | 8 +++----- > 1 file changed, 3 insertions(+), 5 deletions(-) > >diff --git a/C4/Biblio.pm b/C4/Biblio.pm >index 1f1f897e544..863f4d34b4a 100644 >--- a/C4/Biblio.pm >+++ b/C4/Biblio.pm >@@ -306,14 +306,12 @@ sub AddBiblio { > if ( C4::Context->preference("OAI-PMH:AutoUpdateSets") ) { > C4::OAI::Sets::UpdateOAISetsBiblio( $biblionumber, $record ); > } >- >- _after_biblio_action_hooks( { action => 'create', biblio_id => $biblionumber } ); >- >- logaction( "CATALOGUING", "ADD", $biblionumber, "biblio" ) if C4::Context->preference("CataloguingLog"); >- > } > ); > >+ _after_biblio_action_hooks( { action => 'create', biblio_id => $biblionumber } ); >+ logaction( "CATALOGUING", "ADD", $biblionumber, "biblio" ) if C4::Context->preference("CataloguingLog"); >+ > # We index now, after the transaction is committed > unless ($skip_record_index) { > my $indexer = Koha::SearchEngine::Indexer->new( { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); >-- >2.50.1 (Apple Git-155) >
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 36542
:
164589
|
164607
|
184896
|
190939
| 193325 |
193326