Bug #89686
closedtypolink must link to current language
0%
Description
If I have German as the default language and I have activated the French view, then the links should show to the French pages by default. However all links go to the German pages.
https://docs.typo3.org/m/typo3/reference-typoscript/master/en-us/Functions/Typolink.html#language
If I omit the language configuration with the typolink function, then the current (French) language should be used. However the default German language is used.
It only works if I read the language and add the language configuration for each link.
$languageAspect = GeneralUtility::makeInstance(Context::class)->getAspect('language');
// (previously known as TSFE->sys_language_uid)
$result = $languageAspect->getId();
Updated by Benni Mack over 4 years ago
- Status changed from New to Needs Feedback
Hey Franz,
in a regular Frontend Environment the current language is used (if empty the language parameter is set to "current"), which works in my local installation and in all tests.
Can you provide more details where this fails to work?
Updated by Benni Mack over 4 years ago
- Related to Bug #90613: Add language Parameter to several Link/Uri VH added
Updated by Česlav Przywara over 4 years ago
Hi,
I came across what looks like the same problem and found out that in my case the problem has been caused by
config.defaultGetVars.L = 0that has been left in TypoScript setup after upgrade from TYPO3 8 (and RealURL) to TYPO3 9. This configuration prevents the fallback to "current" language (as Benni mentioned above) from kicking in.
Updated by Benni Mack about 4 years ago
- Status changed from Needs Feedback to Closed
will close this issue now, as there was no feedback, I think the explanation is really good. Thanks for sharing the details!