From 8f44b0a97415fa8d843756effaea35f4f9ab05d6 Mon Sep 17 00:00:00 2001 From: EnjoyFelix <100382087+EnjoyFelix@users.noreply.github.com> Date: Thu, 6 Mar 2025 13:37:37 +0100 Subject: [PATCH] # FIX The "AfterImportInsert" hook is not triggered during the simulation. #33260 (#33261) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * AfterImport hook in the simulation of the import * Update import.php * Update import.php * Update import.php --------- Co-authored-by: Elisée Chemin Co-authored-by: Laurent Destailleur --- htdocs/imports/import.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index b3159796514..90d9ef53f22 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -1924,6 +1924,13 @@ if ($step == 5 && $datatoimport) { $nbok++; } } + + $reshook = $hookmanager->executeHooks('AfterImportInsert', $parameters); + if ($reshook < 0) { + $arrayoferrors[$sourcelinenb][] = [ + 'lib' => implode("
", array_merge([$hookmanager->error], $hookmanager->errors)) + ]; + } } // Close file $obj->import_close_file();