From 976add08b325c0e229557b22f1dc92bfc04de2f7 Mon Sep 17 00:00:00 2001 From: Sascha Nowak Date: Sat, 15 Jun 2024 09:29:56 +0200 Subject: [PATCH] fix: set datahandler to isImporting to disable gridelements hooks --- Classes/Service/Importer.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classes/Service/Importer.php b/Classes/Service/Importer.php index 4283917..14b541f 100644 --- a/Classes/Service/Importer.php +++ b/Classes/Service/Importer.php @@ -50,6 +50,8 @@ public function import(string $recordTableName, int $storagePageId, array $tcaRe } $dataHandler = GeneralUtility::makeInstance(DataHandler::class); + $dataHandler->isImporting = true; + $dataHandler->enableLogging = false; $dataHandler->start($data, $commands); $dataHandler->process_datamap(); $dataHandler->process_cmdmap(); @@ -83,6 +85,8 @@ public function removeRecordsExcept(string $recordTableName, int $storagePageId, } $dataHandler = GeneralUtility::makeInstance(DataHandler::class); + $dataHandler->isImporting = true; + $dataHandler->enableLogging = false; $dataHandler->start([], $commands); $dataHandler->process_datamap(); $dataHandler->process_cmdmap();