[MGNLUI-4016] DelegatingMultiValueSubnodeTransformer loses changes in child items when switching language Created: 14/Sep/16  Updated: 09/Dec/16  Resolved: 09/Dec/16

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 5.4.9, 5.5
Fix Version/s: 5.4.11, 5.5.1

Type: Bug Priority: Neutral
Reporter: David Wartel Assignee: Roman Kovařík
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File Transformer problem recording.webm     File test_yaml.yaml    
Issue Links:
relation
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:
Visible to:
Benoit Poncelet, David Wartel, Thim Anneessens
Sprint: Kromeriz 73
Story Points: 8

 Description   

If you re-edit the text in fields in attached dialog (test_yaml.yaml) only values in "DE" are stored properly.

It is possible to reproduce it on demoauthor:
1. Use attached yaml file in as dialog and edit coresponding component/area/page
2. Edit value in English (default): put en, en
3. Edit value in German: put de, de
4. Switch back to English in dialog
5. Save
6. Re-edit both languages
7. Save
8. Check the content (only "DE" is restored correctly)

More you can see on this video:
Transformer problem recording.webm



 Comments   
Comment by Roman Kovařík [ 07/Dec/16 ]

Investigation:

  • info.magnolia.ui.form.field.transformer.multi.DelegatingMultiValueSubnodeTransformer#getRootItem is creating a new item adapter from node.
  • If we add children or properties to this adapter, these are lost when switching language since the adapter is created again ignoring the existing one.
  • We should get the item if already exists and do not create it from node every time.
Generated at Mon Feb 12 09:12:25 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.