diff --git a/Classes/IndexQueue/Initializer/Page.php b/Classes/IndexQueue/Initializer/Page.php index b01708d359..62b76eee47 100644 --- a/Classes/IndexQueue/Initializer/Page.php +++ b/Classes/IndexQueue/Initializer/Page.php @@ -122,6 +122,7 @@ protected function initializeMountPointPages(): bool // The page itself has its own content, which is handled like standard page. $indexQueue = GeneralUtility::makeInstance(Queue::class); $indexQueue->updateItem($this->type, $mountPoint['uid']); + $mountPointsInitialized = true; } // This can happen when the mount point does not show the content of the @@ -160,7 +161,7 @@ protected function isMountPointValid(array $mountPoint): bool { $isValidMountPage = true; - if (empty($mountPoint['mountPageSource'])) { + if (!empty($mountPoint['mountPageOverlayed']) && empty($mountPoint['mountPageSource'])) { $isValidMountPage = false; $flashMessage = GeneralUtility::makeInstance( @@ -173,7 +174,7 @@ protected function isMountPointValid(array $mountPoint): bool $this->flashMessageQueue->addMessage($flashMessage); } - if (!$this->mountedPageExists($mountPoint['mountPageSource'])) { + if (!empty($mountPoint['mountPageOverlayed']) && !$this->mountedPageExists($mountPoint['mountPageSource'])) { $isValidMountPage = false; $flashMessage = GeneralUtility::makeInstance( diff --git a/Tests/Integration/IndexQueue/Initializer/Fixtures/can_add_mount_pages.csv b/Tests/Integration/IndexQueue/Initializer/Fixtures/can_add_mount_pages.csv index 600e66979f..7c72cd2e19 100644 --- a/Tests/Integration/IndexQueue/Initializer/Fixtures/can_add_mount_pages.csv +++ b/Tests/Integration/IndexQueue/Initializer/Fixtures/can_add_mount_pages.csv @@ -2,7 +2,7 @@ "pages", ,"uid","pid","is_siteroot","doktype","mount_pid","mount_pid_ol","slug","title" ,10,1,0,7,2,0,"/mount-point","Mount Point" -,40,1,0,7,0,0,"/invalid-mount-point","Invalid Mount Point" +,40,1,0,7,0,1,"/invalid-mount-point","Invalid Mount Point" ,2,0,1,1,0,0,"/","Mounted" ,20,2,0,1,0,0,"/child-of-mounter","Child of Mounter" diff --git a/Tests/Integration/IndexQueue/Initializer/PageTest.php b/Tests/Integration/IndexQueue/Initializer/PageTest.php index 3a5a51d078..471f5ef73b 100644 --- a/Tests/Integration/IndexQueue/Initializer/PageTest.php +++ b/Tests/Integration/IndexQueue/Initializer/PageTest.php @@ -106,7 +106,7 @@ public function initializerIsFillingQueueWithMountPages(): void $this->assertEmptyQueue(); $this->initializeAllPageIndexQueues(); - $this->assertItemsInQueue(5); + $this->assertItemsInQueue(4); // @todo: verify, is this really as expected? since mount_pid_ol is not set // in the case when mount_pid_ol is set 4 pages get added @@ -240,7 +240,7 @@ public function initializerAddsInfoMessagesAboutInvalidMountPages(): void $this->assertEmptyQueue(); $this->initializeAllPageIndexQueues(); - $this->assertItemsInQueue(5); // The root page of "testtwo.site aka integration_tree_two" is included. + $this->assertItemsInQueue(4); // The root page of "testtwo.site aka integration_tree_two" is included. $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class); $flashMessageQueue = $flashMessageService->getMessageQueueByIdentifier('solr.queue.initializer');