From d4467245973bf875a698b9d6cd8f655bcb02b4f0 Mon Sep 17 00:00:00 2001 From: Arthur Suzuki 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 --- C4/Biblio.pm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 0fd56741d4c..c59c4574000 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -300,12 +300,13 @@ sub AddBiblio { 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"); }); - # We index now, after the transaction is committed + + _after_biblio_action_hooks({ action => 'create', biblio_id => $biblionumber }); + + # We index now, after the transaction is committed unless ( $skip_record_index ) { my $indexer = Koha::SearchEngine::Indexer->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX }); $indexer->index_records( $biblionumber, "specialUpdate", "biblioserver" ); -- 2.44.0