[MGNLUI-6833] Default values on internationalized fields not appearing on dialog in non-default languages Created: 23/Aug/21  Updated: 16/Nov/21  Resolved: 15/Nov/21

Status: Closed
Project: Magnolia UI
Component/s: dialogs, forms
Affects Version/s: 6.2.10, 6.2.11, 6.2.12
Fix Version/s: 6.2.14

Type: Bug Priority: Neutral
Reporter: Roberto Gaona Assignee: Roman Kovařík
Resolution: Fixed Votes: 9
Labels: cs-bk, maintenance, ui-team-support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File formDefaultTest.yaml     PNG File image-2021-08-23-13-22-17-752.png     PNG File image-2021-08-23-13-22-37-361.png     PNG File image.png    
Issue Links:
Problem/Incident
Relates
relates to MGNLUI-6906 Switchable field doesn't keep the def... Closed
relates to MGNLUI-6920 Access availability rule not working ... Closed
duplicate
is duplicated by MGNLUI-6608 checkBoxField defaultValue not set fo... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Sprint: UI Maintenance 1
Story Points: 5

 Description   

Steps to reproduce

  1.  
  2.  

.. Logs, screenshots, gifs...

Expected results

.. Justify non-trivial expectations with a link to a doc or a relevant discussion.

Actual results

Workaround

Development notes



 Comments   
Comment by Vivian Steller [ 26/Oct/21 ]

Also affects 6.2.12

Very serious issue!!

Comment by Jens Kolb [ 27/Oct/21 ]

@Magnolia: Please add 6.2.12 as affected version as well. 

Comment by Bradley Andersen [ 27/Oct/21 ]

Comment by Vivian Steller [ 27/Oct/21 ]

Hi @Bradley,

more importantly this also affects *non-i18n'ed properties*.

Effectively this blocks us and customer projects from Updating to 6.2.12. IMHO this issue's priority should be raised to BLOCKER.

Thanks and best regards,

Vivian

Comment by Roman Kovařík [ 03/Nov/21 ]

For developers:
info.magnolia.ui.editor.FormPresenter#applyDefaults would need to set a field (applyDefaults=true) and the defaults would have to be applied to current language (instead of the default language as it's done currently) and when the user switches to another language for the first time (e.g. first time to DE, first time to ES...).

Comment by fabian schneider [ 03/Nov/21 ]

@rkovarik 
I was looking for a solution and noticed two things.

For multilingual fields, it is not enough to just select the current language in the presenter. In this case, if you don't change to a language, no default values are set there either.
I think you have to set the default values for all available languages.

Also it needs a change in `info.magnolia.ui.editor.FormView#applyDefaults` to trigger the setting of the defaults also for switchable fields in all languages.

Here are my changes:

https://git.magnolia-cms.com/users/vivi/repos/ui/commits/f09f2baf71cf68f36f8e5124a87d2b0ceb3aee48

You suggested a field `applyDefaults=true`. In which case should this be set and evaluated?

Comment by Roman Kovařík [ 03/Nov/21 ]

Hey fschneider,

I don't have access to your fork but I meant something like this.

Roman

Comment by Adam Siska [ 16/Nov/21 ]

For RN: Configured default values are prefilled into fields for all languages/locales.

Generated at Mon Feb 12 09:40:27 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.