From d9fef5367a5c05610e061fa6dc2bc5bfccc9064d Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Thu, 15 Jun 2023 09:55:15 +0200 Subject: [PATCH] Reduce broken time frame due to missing slugs (#23) Dates are vanished and re created during import. Slugs for dates were generate after whole import was finished. This is now changed to generate slugs for dates after saving each single event. --- Classes/Service/DestinationDataImportService.php | 7 +++---- Documentation/Changelog/3.4.0.rst | 7 +++++++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Classes/Service/DestinationDataImportService.php b/Classes/Service/DestinationDataImportService.php index 154c686..6b5b5a2 100644 --- a/Classes/Service/DestinationDataImportService.php +++ b/Classes/Service/DestinationDataImportService.php @@ -260,12 +260,11 @@ class DestinationDataImportService $this->logger->info('Persist database'); $this->eventRepository->update($this->tmpCurrentEvent); $this->persistenceManager->persistAll(); + $this->logger->info('Update slugs'); + $this->slugger->update('tx_events_domain_model_event'); + $this->slugger->update('tx_events_domain_model_date'); } - $this->logger->info('Update slugs'); - $this->slugger->update('tx_events_domain_model_event'); - $this->slugger->update('tx_events_domain_model_date'); - $this->logger->info('Finished import'); return 0; } diff --git a/Documentation/Changelog/3.4.0.rst b/Documentation/Changelog/3.4.0.rst index 7e8e46d..be63657 100644 --- a/Documentation/Changelog/3.4.0.rst +++ b/Documentation/Changelog/3.4.0.rst @@ -43,6 +43,13 @@ Fixes It didn't check if a file that could be deleted because one event got deleted, was still in use by another event. +* Generate slugs after each single event was imported. + This should prevent a situation where a large amount of events is imported without + having slugs. + Routing might break depending on configuration. + The time range where this can happen is now reduced as slugs for each event and + date is generated right after saving each of them. + Tasks -----