Skip to content

Commit

Permalink
[BUGFIX] ignore pages.l18n_cfg of translated posts when searching for…
Browse files Browse the repository at this point in the history
… translations

When creating new translation, TYPO3 sets this field to the same value as the translation source,
so nothing can be found for pages.l18n_cfg == 2 ("Hide page if no translation for current language exists").
  • Loading branch information
f000 committed Jan 11, 2024
1 parent ce2dc48 commit 477c832
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Domain/Repository/PostRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public function findCurrentPost(): ?Post
protected function getPostWithLanguage(int $pageId, int $languageId): ?Post
{
$query = $this->createQuery();
$constraints = $this->defaultConstraints;
$constraints[] = $query->equals('doktype', Constants::DOKTYPE_BLOG_POST);

if ($languageId > 0) {
$constraints[] = $query->equals('l10n_parent', $pageId);
Expand Down

0 comments on commit 477c832

Please sign in to comment.