Skip to content

Commit

Permalink
Merge branch 'hotfix/fix_indexing_for_languages' into 'release/2.3.0'
Browse files Browse the repository at this point in the history
Fix indexing for languages

See merge request metamodels/core!353
  • Loading branch information
zonky2 committed Nov 4, 2024
2 parents 6a4c02b + f86a5a7 commit fd92a52
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/CoreBundle/EventListener/GetSearchablePagesListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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'];
Expand All @@ -225,6 +226,8 @@ private function generateUrlsFor(
}
$GLOBALS['TL_LANGUAGE'] = $language;

$listFilter = $this->getListFilter($metaModel, $filterId, $filterParams);

$items = $metaModel->findByFilter(
$listFilter,
'',
Expand Down

0 comments on commit fd92a52

Please sign in to comment.