Skip to content

Commit

Permalink
[BUGFIX] Fix storagePid problem in PostRepository
Browse files Browse the repository at this point in the history
This patch fixes a problem with ignored storagePid if there are multiple
blog post plugins on the same page. Only the storagePid setting from the
first plugin was evaluated.

Fixes TYPO3GmbH#292
  • Loading branch information
peterkraume committed Nov 8, 2023
1 parent ce2dc48 commit 279d669
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Classes/Domain/Repository/PostRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class PostRepository extends Repository
public function initializeObject(): void
{
$configurationManager = GeneralUtility::makeInstance(ConfigurationManagerInterface::class);
$this->settings = $configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, 'blog');

$querySettings = GeneralUtility::makeInstance(
Typo3QuerySettings::class,
Expand Down Expand Up @@ -414,7 +413,10 @@ public function findRelatedPosts(int $categoryMultiplier = 1, int $tagMultiplier

protected function getStoragePidsFromTypoScript(): array
{
return GeneralUtility::intExplode(',', $this->settings['persistence']['storagePid']);
$configurationManager = GeneralUtility::makeInstance(ConfigurationManagerInterface::class);
$settings = $configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);

return GeneralUtility::intExplode(',', $settings['persistence']['storagePid']);
}

/**
Expand Down

0 comments on commit 279d669

Please sign in to comment.