diff --git a/Classes/Domain/Index/Queue/QueueItemRepository.php b/Classes/Domain/Index/Queue/QueueItemRepository.php index bdf7dea692..44e92e0310 100644 --- a/Classes/Domain/Index/Queue/QueueItemRepository.php +++ b/Classes/Domain/Index/Queue/QueueItemRepository.php @@ -397,16 +397,20 @@ public function containsItem(string $itemType, int $itemUid): bool * @param string $itemType The item's type, usually a table name. * @param int $itemUid The item's uid * @param int $rootPageId + * @param string $indexingConfiguration * @return bool TRUE if the item is found in the queue, FALSE otherwise * * @throws DBALDriverException * @throws DBALException|\Doctrine\DBAL\DBALException */ - public function containsItemWithRootPageId(string $itemType, int $itemUid, int $rootPageId): bool + public function containsItemWithRootPageId(string $itemType, int $itemUid, int $rootPageId, string $indexingConfiguration): bool { $queryBuilder = $this->getQueryBuilderForContainsMethods($itemType, $itemUid); return (bool)$queryBuilder - ->andWhere($queryBuilder->expr()->eq('root', $rootPageId)) + ->andWhere( + $queryBuilder->expr()->eq('root', $rootPageId), + $queryBuilder->expr()->eq('indexing_configuration', $queryBuilder->createNamedParameter($indexingConfiguration)) + ) ->execute() ->fetchOne(); } diff --git a/Classes/IndexQueue/Queue.php b/Classes/IndexQueue/Queue.php index 7bafdb4823..a030d023a2 100644 --- a/Classes/IndexQueue/Queue.php +++ b/Classes/IndexQueue/Queue.php @@ -220,7 +220,7 @@ protected function updateOrAddItemForAllRelatedRootPages(string $itemType, $item continue; } $indexingPriority = $solrConfiguration->getIndexQueueIndexingPriorityByConfigurationName($indexingConfiguration); - $itemInQueueForRootPage = $this->containsItemWithRootPageId($itemType, $itemUid, $rootPageId); + $itemInQueueForRootPage = $this->containsItemWithRootPageId($itemType, $itemUid, $rootPageId, $indexingConfiguration); if ($itemInQueueForRootPage) { // update changed time if that item is in the queue already $changedTime = ($forcedChangeTime > 0) ? $forcedChangeTime : $this->getItemChangedTime($itemType, $itemUid); @@ -482,13 +482,14 @@ public function containsItem(string $itemType, $itemUid): bool * @param int|string $itemUid The item's uid, usually an integer uid, could be a * different value for non-database-record types. * @param int $rootPageId + * @param string $indexingConfiguration * @return bool TRUE if the item is found in the queue, FALSE otherwise * @throws DBALDriverException * @throws DBALException|\Doctrine\DBAL\DBALException */ - public function containsItemWithRootPageId(string $itemType, $itemUid, int $rootPageId): bool + public function containsItemWithRootPageId(string $itemType, $itemUid, int $rootPageId, string $indexingConfiguration): bool { - return $this->queueItemRepository->containsItemWithRootPageId($itemType, (int)$itemUid, $rootPageId); + return $this->queueItemRepository->containsItemWithRootPageId($itemType, (int)$itemUid, $rootPageId, $indexingConfiguration); } /**