Issue Bug Closed

#84923Link generation across domains/languages not working when using site configuration

Christian Heindl 05/04/18, 13:17 updated 08/31/18, 12:20

Description

It started using new site configuration which is available with 9.2. I use the following site configuration (example):

site:
  rootPageId: 1
  base: 'https://mysite-de.local'
  languages:
    -
      languageId: '0'
      title: German
      navigationTitle: Deutsch
      base: /
      locale: de_DE.UTF-8
      iso-639-1: de
      hreflang: de-DE
      direction: ltr
      typo3Language: default
      flag: de
    -
      languageId: '1'
      title: English
      navigationTitle: ''
      base: 'https://mysite-en.local/'
      locale: en_GB.UTF-8
      iso-639-1: en
      hreflang: en-GB
      direction: ltr
      typo3Language: en
      flag: gb
      fallbackType: strict
    -
      languageId: '2'
      title: Chinese
      navigationTitle: ''
      base: 'https://mysite-en.local/cn'
      locale: zh_CN.UTF-8
      iso-639-1: zh
      hreflang: zh-CN
      direction: ltr
      typo3Language: ch
      flag: cn
      fallbackType: strict

Now, i try to generate a language menu by using TYPO3 typolink API like the following:

$cObj->typoLink_URL(['parameter' => 't3://page?uid=1', 'additionalParams' => '&L=0', 'forceAbsoluteUrl' => true])
$cObj->typoLink_URL(['parameter' => 't3://page?uid=1', 'additionalParams' => '&L=1', 'forceAbsoluteUrl' => true])
$cObj->typoLink_URL(['parameter' => 't3://page?uid=1', 'additionalParams' => '&L=2', 'forceAbsoluteUrl' => true])

The result gives me absolute links, but always pointing to the domain what I’m currently calling. Thus there is no language change possible between Language 0 and Language 1, as they both point to the root of two domains:

https://mysite-de.local/?id=1
https://mysite-de.local/?id=1
https://mysite-de.local/cn?id=1

This must be fixed when further following the new site configuration approach!

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.