Details
-
Bug
-
Resolution: Fixed
-
Neutral
-
6.2.12
-
None
-
None
-
Empty show more show less
-
Yes
-
UI Maintenance 2
-
2
Description
Steps to reproduce
- Create a switchable field like the example we provide at our docu
myComponent.yaml
form: properties: switchable: $type: switchableField i18n: true field: $type: radioButtonGroupField layout: horizontal defaultValue: foo datasource: $type: optionListDatasource options: - name: foo value: foo - name: bar value: bar itemProvider: $type: jcrChildNodeProvider forms: - name: foo properties: foo: $type: textField - name: bar properties: bar: $type: richTextField
- Create the component on a site which has multiple languages enabled
- Check the defaultValue is selected when opening the dialog
- Switch from fallback local to another one
- Check the defaultValue is not selected
Expected results
When user switch language, the defaultValue is selected
Actual results
The defaultValue is only selected for the default language when opening the dialog
Workaround
N/A
Development notes
Tested on Magnolia 5.7 and the "selected" option was working as expected. When you switch between languages, the "selected" option is always properly marked.
Anyhow, even using the old UI 5 dialog definition, it doesn't work on Magnolia 6, e.g:
myOldDefinition.yaml
form: tabs: - name: tabText label: Text fields: - name: message class: info.magnolia.ui.form.field.definition.SwitchableFieldDefinition label: Message i18n: true options: - name: plainText label: Plain selected: true value: plainText - name: richText label: Rich value: richText fields: - name: plainText class: info.magnolia.ui.form.field.definition.TextFieldDefinition label: Plain text message rows: 5 - name: richText class: info.magnolia.ui.form.field.definition.RichTextFieldDefinition label: Rich text message height: 200 actions: commit: class: info.magnolia.ui.admincentral.dialog.action.SaveDialogActionDefinition cancel: class: info.magnolia.ui.admincentral.dialog.action.CancelDialogActionDefinition
Checklists
Acceptance criteria
Attachments
Issue Links
- is related to
-
MGNLUI-7030 Switchable field creates empty contentNodes for non selected option
-
- Closed
-
- relates to
-
MGNLUI-6833 Default values on internationalized fields not appearing on dialog in non-default languages
-
- Closed
-