From 5cf17e942e5ef203cefe16b437a2197534244d2a Mon Sep 17 00:00:00 2001 From: Blackbit Date: Tue, 17 Sep 2024 14:02:58 +0200 Subject: [PATCH] Use default config for sites which do not have a zone --- src/Builder/ZoneBuilder.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Builder/ZoneBuilder.php b/src/Builder/ZoneBuilder.php index 26ca352..9c87ecd 100644 --- a/src/Builder/ZoneBuilder.php +++ b/src/Builder/ZoneBuilder.php @@ -56,7 +56,8 @@ public function buildZone(RouteItemInterface $routeItem): ZoneInterface // no valid zone found. use default one. if ($validZone === false) { - throw new \Exception(sprintf('No i18n zone for domain "%s" found. Maybe there is a typo in your i18n.zones.domains mapping?', $site->getMainDomain())); + $zoneConfig = $this->configuration->getConfigNode(); + return $this->createZone($zoneConfig, 'dynamic_zone_'.$site->getId(), 'dynamic_zone_'.$site->getId(), [$site->getMainDomain()]); } return $this->createZone($zoneConfig['config'], $zoneConfig['id'], $zoneConfig['name'], $zoneConfig['domains']);