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

Changing default_language doesn't set siteroot.language #2168

Open
jaroel opened this issue Oct 6, 2017 · 2 comments
Open

Changing default_language doesn't set siteroot.language #2168

jaroel opened this issue Oct 6, 2017 · 2 comments

Comments

@jaroel
Copy link
Member

jaroel commented Oct 6, 2017

When I change the default language in @@language-controlpanel, then the language attribute on the site root object isn't changed to reflect this.

This causes constraint errors in adding/editing DX objects when the previous default language is no longer one of the available languages.
ie, when changing the site from EN to only DE after initial setup.

Also see plone/plone.app.dexterity#258

@jaroel
Copy link
Member Author

jaroel commented Oct 6, 2017

Use this in an upgrade step as a workaround:

from plone import api
pl = api.portal.get_tool('portal_languages')
default_language = pl.getDefaultLanguage()
root = api.portal.get()
root.language = default_language

@jensens
Copy link
Member

jensens commented Oct 14, 2017

I can confirm this, also the DX control panel does not work any longer.

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

No branches or pull requests

2 participants