diff --git a/Classes/Controller/AbstractBaseController.php b/Classes/Controller/AbstractBaseController.php index 3c17c9f4f0..393be7582b 100644 --- a/Classes/Controller/AbstractBaseController.php +++ b/Classes/Controller/AbstractBaseController.php @@ -142,7 +142,6 @@ protected function buildControllerContext() /** @var $controllerContext SolrControllerContext */ $controllerContext = $this->objectManager->get(SolrControllerContext::class); $controllerContext->setRequest($this->request); -// $controllerContext->setResponse($this->response); if ($this->arguments !== null) { $controllerContext->setArguments($this->arguments); } diff --git a/Classes/FrontendEnvironment/Tsfe.php b/Classes/FrontendEnvironment/Tsfe.php index 49d62358b9..5e62712970 100644 --- a/Classes/FrontendEnvironment/Tsfe.php +++ b/Classes/FrontendEnvironment/Tsfe.php @@ -98,9 +98,9 @@ protected function initializeTsfe(int $pageId, int $language = 0, ?int $rootPage $reusedCacheIdentifier = $this->getCacheIdentifier($pidToUse, $language, $rootPageId); $this->serverRequestCache[$cacheIdentifier] = $this->serverRequestCache[$reusedCacheIdentifier]; $this->tsfeCache[$cacheIdentifier] = $this->tsfeCache[$reusedCacheIdentifier]; -// if ($rootPageId === null) { -// // @Todo: Resolve and set TSFE object for $rootPageId. -// } + // if ($rootPageId === null) { + // @Todo: Resolve and set TSFE object for $rootPageId. + // } return; } diff --git a/Classes/IndexQueue/Indexer.php b/Classes/IndexQueue/Indexer.php index 9d30283c4f..53c9f06ca5 100644 --- a/Classes/IndexQueue/Indexer.php +++ b/Classes/IndexQueue/Indexer.php @@ -467,9 +467,6 @@ protected function getAccessRootline(Item $item) */ protected function processDocuments(Item $item, array $documents): array { -// // needs to respect the TS settings for the page the item is on, conditions may apply -// $solrConfiguration = $this->frontendEnvironment->getSolrConfigurationFromPageId($item->getRootPageUid()); - $siteRepository = GeneralUtility::makeInstance(SiteRepository::class); $solrConfiguration = $siteRepository->getSiteByPageId($item->getRootPageUid())->getSolrConfiguration(); $fieldProcessingInstructions = $solrConfiguration->getIndexFieldProcessingInstructionsConfiguration(); diff --git a/Tests/Integration/IndexQueue/IndexerTest.php b/Tests/Integration/IndexQueue/IndexerTest.php index 921cdd3f17..e73dfcdd49 100644 --- a/Tests/Integration/IndexQueue/IndexerTest.php +++ b/Tests/Integration/IndexQueue/IndexerTest.php @@ -254,8 +254,6 @@ public function canIndexMultipleMMRelatedItems() { $this->cleanUpSolrServerAndAssertEmpty('core_en'); -// $this->writeDefaultSolrTestSiteConfiguration(); - // create fake extension database table and TCA $this->importExtTablesDefinition('fake_extension2_table.sql'); $GLOBALS['TCA']['tx_fakeextension_domain_model_bar'] = include($this->getFixturePathByName('fake_extension2_bar_tca.php')); diff --git a/Tests/Unit/Domain/Search/FrequentSearches/FrequentSearchesServiceTest.php b/Tests/Unit/Domain/Search/FrequentSearches/FrequentSearchesServiceTest.php index 19f4a2539d..b9dd8fb29c 100644 --- a/Tests/Unit/Domain/Search/FrequentSearches/FrequentSearchesServiceTest.php +++ b/Tests/Unit/Domain/Search/FrequentSearches/FrequentSearchesServiceTest.php @@ -63,18 +63,19 @@ protected function setUp(): void $this->configurationMock = $this->getDumbMock(TypoScriptConfiguration::class); $this->frequentSearchesService = new class($this->configurationMock, $this->cacheMock, $this->tsfeMock, $this->statisticsRepositoryMock) extends FrequentSearchesService { -// protected function getCacheIdentifier(array $frequentSearchConfiguration) : string { -// $identifier = 'frequentSearchesTags'; -// if (isset($frequentSearchConfiguration['select.']['checkRootPageId']) && $frequentSearchConfiguration['select.']['checkRootPageId']) { -// $identifier .= '_RP' . 4710; -// } -// if (isset($frequentSearchConfiguration['select.']['checkLanguage']) && $frequentSearchConfiguration['select.']['checkLanguage']) { -// $identifier .= '_L' . 0; -// } -// -// $identifier .= '_' . md5(serialize($frequentSearchConfiguration)); -// return $identifier; -// } + protected function getCacheIdentifier(array $frequentSearchConfiguration): string + { + $identifier = 'frequentSearchesTags'; + if (isset($frequentSearchConfiguration['select.']['checkRootPageId']) && $frequentSearchConfiguration['select.']['checkRootPageId']) { + $identifier .= '_RP' . 4710; + } + if (isset($frequentSearchConfiguration['select.']['checkLanguage']) && $frequentSearchConfiguration['select.']['checkLanguage']) { + $identifier .= '_L' . 0; + } + + $identifier .= '_' . md5(serialize($frequentSearchConfiguration)); + return $identifier; + } }; parent::setUp(); } diff --git a/Tests/Unit/SearchTest.php b/Tests/Unit/SearchTest.php index 932308f172..9c94850020 100644 --- a/Tests/Unit/SearchTest.php +++ b/Tests/Unit/SearchTest.php @@ -43,7 +43,6 @@ class SearchTest extends UnitTest protected function setUp(): void { -// $this->solrReadServiceMock = $this->getDumbMock(SolrReadService::class); $this->solrReadServiceMock = $this->getMockBuilder(SolrReadService::class) ->disableOriginalConstructor() ->onlyMethods(['search'])