#106316site_base_variant not compatible with language baseUrl if a fully qualified domain is used
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.
History 4
-
Georg Ringer commented and changed status
NewNeeds Feedback <span data-processor="relativetime" data-value="2025-03-06T09:22:24+00:00" > 03/06/25, 09:22 </span> -
Philipp Wrann commented <span data-processor="relativetime" data-value="2025-03-06T10:12:07+00:00" > 03/06/25, 10:12 </span>
Definitly a possible workaround, thank you for pointing that out. I was about to evaluate a PSR-14 listener.
-
Georg Ringer commented and changed status
Needs FeedbackClosed <span data-processor="relativetime" data-value="2025-03-06T16:24:05+00:00" > 03/06/25, 16:24 </span>closing as duplicate of #86400
-
Georg Ringer changed Duplicates #86400 <span data-processor="relativetime" data-value="2025-03-06T16:24:14+00:00" > 03/06/25, 16:24 </span>
we solve this by using ENV vars. would that work for you as well?