Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default config for sites which do not have a zone #166

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

BlackbitDevs
Copy link
Contributor

@BlackbitDevs BlackbitDevs commented Sep 17, 2024

Q A
Bug fix? no
New feature? yes
BC breaks? not sure
Deprecations? no

If you have configured zones as described in https://github.com/dachcom-digital/pimcore-i18n/blob/master/docs/20_Zones.md and afterwards add a new site /new-site, add localization pages like /new-site/de and assign it a language, you will get the error message:

This document can not be edited because it will be skipped during a i18n redirection or does not have a valid language property.
No i18n zone for domain "new-site.example.org" found. Maybe there is a typo in your i18n.zones.domains mapping?

Although

// 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()));
}
pretends // no valid zone found. use default one., it throws the exception which does not fall back to using default zone.

With this PR a temporary zone based on the default configuration will get created for the main domain of the site.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant