Commit 0914c0bc authored by Nicole Cordes's avatar Nicole Cordes Committed by Andreas Fernandez
Browse files

[BUGFIX] Ensure linkText is returned for missing languages

This patch ensures the linkText is returned and used if
the target page is not available in the current language.

Resolves: #90182
Releases: master, 10.4
Change-Id: Ifed1921ff42746582dd5abab93fafe7a29c12233

Tested-by: default avatarTYPO3com <>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <>
parent fae4865a
......@@ -20,6 +20,7 @@ ignoreFiles+="sysext/extbase/Classes/Core/Bootstrap.php"
# both ActionController and AbstractController throw the same exceptions
# until AbstractController is removed
......@@ -184,7 +184,11 @@ class PageLinkBuilder extends AbstractTypolinkBuilder
// Link to a page that has a site configuration
if ($siteOfTargetPage !== null) {
$siteLanguageOfTargetPage = $this->getSiteLanguageOfTargetPage($siteOfTargetPage, (string)($conf['language'] ?? 'current'));
try {
$siteLanguageOfTargetPage = $this->getSiteLanguageOfTargetPage($siteOfTargetPage, (string)($conf['language'] ?? 'current'));
} catch (UnableToLinkException $e) {
throw new UnableToLinkException($e->getMessage(), $e->getCode(), $e, $linkText);
$languageAspect = LanguageAspectFactory::createFromSiteLanguage($siteLanguageOfTargetPage);
// Now overlay the page in the target language, in order to have valid title attributes etc.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment