Skip to content

Commit

Permalink
Use default config for sites which do not have a zone
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackbitDevs authored Sep 17, 2024
1 parent c7381c1 commit 5cf17e9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Builder/ZoneBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down

0 comments on commit 5cf17e9

Please sign in to comment.