Bug #86363
closed
Broken navigation link when using "Hide default translation of page"
Added by Marvin Dettinger about 6 years ago.
Updated over 5 years ago.
Description
We are currently experiencing an issue with the localization option "Hide default translation of page".
Setting this option leads to an invalid link on the translated page.
Steps to reproduce:¶
Assumption:
- Blank TYPO3 Project with English as default language
- German as foreign language
- A simple page tree with a few subpages
- A HMENU which renders the page tree
Scenario:
- Setting the option "Hide default translation of page" on Page X
Excepted Result:
- The page throws a 404 error in EN
- The page excluded from Navigation in EN
- The page is visible in DE
- The page is shown in the Navigation in DE
Actual Result:
- All of above but: the link in DE is broken (only the label is shown without the a-tag)
Files
- Related to Bug #86242: "Hide page in default language" broken for pages without a site configuration added
- Description updated (diff)
Hi,
thanks for reporting. Just a few questions because we kind of had that issue recently with #86242
- Are you on current master?
- Do you use the new site handling? Does your page tree have a site configuration?
Hi
Yes, this was tested on the current master and the site configuration in the example above looks like this:
rootPageId: 1
base: /
languages:
-
languageId: '0'
title: English
navigationTitle: ''
base: /en/
locale: en_US.utf8
iso-639-1: en
hreflang: ''
direction: ''
typo3Language: default
flag: gb
enabled: true
-
languageId: '1'
title: German
navigationTitle: ''
base: /de/
locale: de_CH.utf8
iso-639-1: de
hreflang: ''
direction: ''
typo3Language: default
flag: de
fallbackType: strict
fallbacks: '0'
enabled: true
errorHandling: { }
baseVariants: { }
routes: { }
- Target version changed from 9 LTS to Candidate for patchlevel
I can reproduce it with 10.0.0-dev (latest master) using the steps in the description.
- Has duplicate Bug #87014: Link when l18n_cfg is set to "Hide default translation of page" isn't generated added
Same problem on a 9.5.4 installation
The issue seems to be located in the class PageLinkBuilder which returns an UnableToLinkException (Unable to link "|": Default language of page "2" is hidden, so "|" was not
linked.).
As far I could see the exception is thrown in...
if ($languageOfPageRecord === 0 && GeneralUtility::hideIfDefaultLanguage($page['l18n_cfg'])) {
throw new UnableToLinkException('Default language of page "' . $linkDetails['typoLinkParameter'] . '" is hidden, so "' . $linkText . '" was not linked.', 1529527301, null, $linkText);
}
$languageOfPageRecord is zero because $page gets not overlayed due missing $conf['language'].
- Status changed from New to Needs Feedback
Hey all,
we've worked on this, and fixed this area for 9.5.5 - can you please recheck the issue with the latest version?
Thanks.
Benni.
- Status changed from Needs Feedback to Closed
- Target version deleted (
Candidate for patchlevel)
I close this issue as it is no more reproducible on 9.5.5 or 10.0.0-dev (latest master).
If you think that this is the wrong decision or experience the issue again please reopen it or ping me. Thank you.
Also available in: Atom
PDF