Skip to content

Commit b38a6cc

Browse files
authored
blog friendly URL generation now skips translations with null names (#4309)
2 parents f71253b + c2113bc commit b38a6cc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Model/Blog/Article/BlogArticleDetailFriendlyUrlDataProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public function getFriendlyUrlData(DomainConfig $domainConfig): array
4242
->leftJoin(FriendlyUrl::class, 'f', Join::WITH, 'ba.id = f.entityId AND f.routeName = :routeName AND f.domainId = :domainId')
4343
->setParameter('routeName', static::ROUTE_NAME)
4444
->setParameter('domainId', $domainConfig->getId())
45-
->andWhere('f.entityId IS NULL');
45+
->andWhere('f.entityId IS NULL')
46+
->andWhere('bat.name IS NOT NULL');
4647

4748
$scalarData = $queryBuilder->getQuery()->getScalarResult();
4849

src/Model/Blog/Category/BlogCategoryDetailFriendlyUrlDataProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public function getFriendlyUrlData(DomainConfig $domainConfig): array
4242
->leftJoin(FriendlyUrl::class, 'f', Join::WITH, 'bc.id = f.entityId AND f.routeName = :routeName AND f.domainId = :domainId')
4343
->setParameter('routeName', static::ROUTE_NAME)
4444
->setParameter('domainId', $domainConfig->getId())
45-
->where('f.entityId IS NULL');
45+
->where('f.entityId IS NULL')
46+
->andWhere('bct.name IS NOT NULL');
4647

4748
$scalarData = $queryBuilder->getQuery()->getScalarResult();
4849

0 commit comments

Comments
 (0)