Details
-
Bug
-
Resolution: Fixed
-
Minor
-
5.3.10
-
-
Empty show more show less
-
Basel 13
-
2
Description
@Override
public Field<Boolean> createField() {
super.createField();
if (definition.isI18n()) {
if (item instanceof JcrItemAdapter) {
javax.jcr.Item jcrItem = ((JcrItemAdapter) item).getJcrItem();
if (jcrItem.isNode()) {
Node node = (Node) jcrItem;
List<Locale> locales = i18nAuthoringSupport.getAvailableLocales(node);
Locale defaultLocale = getDefaultLocale(node);
for (Locale locale : locales) {
if (!locale.getLanguage().equals(defaultLocale.getLanguage())) {
Property<?> property = initializeLocalizedProperty(locale);
setPropertyDataSourceAndDefaultValue(property);
}
}
}
}
}
return field;
}
If i18n support is enabled on the form; but not in system itself the for loop causes a null pointer as locales are null.
There are two options to fix:
- enable i18n support on system level
- disable i18n inside the form
Checklists
Acceptance criteria
Attachments
Issue Links
- is related to
-
MGNLUI-3451 Checkbox doesn't preserve default value upon switching to another language
-
- Closed
-