From ce731bc987c3aeff5f87f48a529fbc5a7c4bd6a9 Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Sat, 9 Aug 2025 17:19:13 +0200 Subject: [PATCH] Fix async browser import with nested children The `parseEntry` function recurses into children and dispatches their processing. However, validate will reject any entry that does not have a url e.g. parents. We need to call parseEntries before so that the processing of children is dispatched, otherwise nothing is imported. --- src/Consumer/AbstractConsumer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Consumer/AbstractConsumer.php b/src/Consumer/AbstractConsumer.php index 7a0736114..5f3d8ab8e 100644 --- a/src/Consumer/AbstractConsumer.php +++ b/src/Consumer/AbstractConsumer.php @@ -46,6 +46,8 @@ abstract class AbstractConsumer $this->import->setUser($user); + $entry = $this->import->parseEntry($storedEntry); + if (false === $this->import->validateEntry($storedEntry)) { $this->logger->warning('Entry is invalid', ['entry' => $storedEntry]); @@ -53,8 +55,6 @@ abstract class AbstractConsumer return true; } - $entry = $this->import->parseEntry($storedEntry); - if (null === $entry) { $this->logger->warning('Entry already exists', ['entry' => $storedEntry]);