diff --git a/src/CoreBundle/EventListener/GetSearchablePagesListener.php b/src/CoreBundle/EventListener/GetSearchablePagesListener.php index 86cbe20cb..ded1a3ceb 100644 --- a/src/CoreBundle/EventListener/GetSearchablePagesListener.php +++ b/src/CoreBundle/EventListener/GetSearchablePagesListener.php @@ -149,7 +149,6 @@ public function __invoke(SitemapEvent $event): void $metaModel = $this->getMetaModel($metaModelId); assert($metaModel instanceof IMetaModel); $filterParams = StringUtil::deserialize($config['filterparams'], true); - $listFilter = $this->getListFilter($metaModel, (string) $config['filter'], $filterParams); $renderSetting = $this->renderSettingFactory->createCollection($metaModel, (string) $config['rendersetting']); @@ -180,8 +179,9 @@ public function __invoke(SitemapEvent $event): void $langCode, $renderSetting, $pageDetails, + (string) $config['filter'], $filterAttributes, - $listFilter + $filterParams, ) as $url ) { $loc = $sitemap->createElement('loc', $url); @@ -212,8 +212,9 @@ private function generateUrlsFor( string $language, IRenderSettingCollection $renderSetting, array $pageDetails, + string $filterId, array $filterAttributes, - IFilter $listFilter + array $filterParams, ): Generator { // Save language. $currentLanguage = $GLOBALS['TL_LANGUAGE']; @@ -225,6 +226,8 @@ private function generateUrlsFor( } $GLOBALS['TL_LANGUAGE'] = $language; + $listFilter = $this->getListFilter($metaModel, $filterId, $filterParams); + $items = $metaModel->findByFilter( $listFilter, '',