I am getting this error for some DX content types when clicking on the "fields" tab of a content type within the control panel. In this particular case the site language is NL, allowed languages are NL + EN.
Traceback (innermost last):
Module ZPublisher.WSGIPublisher, line 162, in transaction_pubevents
Module ZPublisher.WSGIPublisher, line 359, in publish_module
Module ZPublisher.WSGIPublisher, line 254, in publish
Module ZPublisher.mapply, line 85, in mapply
Module ZPublisher.WSGIPublisher, line 63, in call_object
Module plone.z3cform.layout, line 63, in __call__
Module plone.z3cform.layout, line 47, in update
Module plone.z3cform.fieldsets.extensible, line 65, in update
Module plone.z3cform.patch, line 30, in GroupForm_update
Module z3c.form.group, line 141, in update
Module z3c.form.group, line 52, in update
Module z3c.form.group, line 48, in updateWidgets
Module z3c.form.field, line 277, in update
Module z3c.form.browser.select, line 51, in update
Module z3c.form.browser.widget, line 171, in update
Module z3c.form.widget, line 234, in update
Module Products.CMFPlone.patches.z3c_form, line 47, in _wrapped
Module z3c.form.widget, line 115, in update
Module zope.schema._bootstrapfields, line 113, in __get__
Module zope.schema._bootstrapfields, line 292, in validate
Module zope.schema._field, line 483, in _validate
zope.schema._bootstrapinterfaces.ConstraintNotSatisfied: ('en-us', 'language')
Not sure where this en-us
would come from
(Pdb++) pp self.__dict__
{'_Element__tagged_values': None,
'__doc__': 'label_language',
'__name__': 'language',
'_init_field': False,
'_resolve_vocabulary': <function Choice.bind.<locals>.<lambda> at 0x7fe1f3708310>,
'context': <TypeSchemaContext at /Plone2/dexterity-types/SubsiteFolder>,
'default': None,
'defaultFactory': <function default_language at 0x7fe1fcfa54c0>,
'description': '',
'interface': <SchemaClass plone.app.dexterity.behaviors.metadata.ICategorization>,
'missing_value': '',
'order': 1020,
'readonly': False,
'required': False,
'title': 'label_language',
'vocabulary': <zope.schema.vocabulary.SimpleVocabulary object at 0x7fe1f3b998e0>,
'vocabularyName': 'plone.app.vocabularies.SupportedContentLanguages'}
(Pdb++) pp value
'en-us'