Project

General

Profile

Actions

Bug #89686

closed

typolink must link to current language

Added by Franz Holzinger about 5 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2019-11-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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();

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #90613: Add language Parameter to several Link/Uri VHClosed2020-03-02

Actions
Actions #1

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?

Actions #2

Updated by Benni Mack over 4 years ago

  • Related to Bug #90613: Add language Parameter to several Link/Uri VH added
Actions #3

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 = 0
that 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.

Actions #4

Updated by Francois Suter over 4 years ago

Same observation.

Actions #5

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!

Actions

Also available in: Atom PDF