Issue Bug Closed

#106316site_base_variant not compatible with language baseUrl if a fully qualified domain is used

Philipp Wrann 03/06/25, 08:00 updated 03/06/25, 16:24

Description

Imagine the following site-config setup:

base: 'https://production.domain.tld/'
baseVariants:
  -
    base: 'https://staging.domain.tld/'
    condition: 'applicationContext == "Production/Staging"'
languages:
  -
    title: English
    base: 'https://en.production.domain.tld/'
    languageId: 0
  -
    title: Deutsch
    base: 'https://de.production.domain.tld/'
    languageId: 1

Whenever i want to access https://staging.domain.tld/, i will be redirected to https://en.production.domain.tld/

How can this be solved?

Well – a base-variant should also have language-overrides, something like this:

base: 'https://production.domain.tld/'
baseVariants:
  -
    base: 'https://staging.domain.tld/'
    condition: 'applicationContext == "Production/Staging"'
    languages:
      -
        base: 'https://en.staging.domain.tld/'
        languageId: 0
      -
        base: 'https://de.staging.domain.tld/'
        languageId: 1
languages:
  -
    title: English
    base: 'https://en.production.domain.tld/'
    languageId: 0
  -
    title: Deutsch
    base: 'https://de.production.domain.tld/'
    languageId: 1

That could solve this very problem but there might be better ways to do this and handle much more context-specific things.

Reviews 0

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