[CONTEDIT-402] Handle i18n in MultiBlock Created: 02/Aug/21  Updated: 11/Aug/21  Resolved: 05/Aug/21

Status: Closed
Project: Content Editor
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Dai Ha Assignee: Oanh Thai Hoang
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2021-08-05 at 09.50.22-1.png     PNG File Screen Shot 2021-08-05 at 09.50.22.png    
Issue Links:
Cloners
is cloned by CONTEDIT-405 Wish-list: Handle i18n config in one ... Closed
dependency
is depended upon by CONTEDIT-411 Handle i18n in MultiJcrBlockDefinition Closed
relation
is related to CONTEDIT-392 POC i18n Stories App Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: i18n Stories App

 Description   
  • Check and adapt MultiField i18n support in stories app


 Comments   
Comment by Oanh Thai Hoang [ 05/Aug/21 ]

After investigating for block multi field. Currently block multi field is using itemProvider is currentItemProvider and this is warning you can find in docu. https://docs.magnolia-cms.com/product-docs/6.2/Templating/Dialog-definition/Field-definition/Item-providers.html. 

Do not use currentItemProvider with multi fields. The same nodes could be resolved by multiple fields that use currentItemProvider, which means their content would be overwritten. Additionally, if a multi field is not configured to resolve nodes strictly (the strict property is set to false by default), it will resolve irrelevant nodes from the parent and likely result in errors.

Solution: In this case, if we continue want to support i18n with block and currentItemProvider. We have to enable i18n = true in both multi field and subfield (text, image, date... block) to ensure it can store data with different name. And have to add some changes in JcrBlockChildNodeProviderStrategy, MultiJcrBlockEntryResolution to support it

See output: 

 

Generated at Mon Feb 12 00:20:04 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.