[MGNLCTS-86] Composite fields don't appear as translatable fields/rows in xls/csv exported files Created: 06/Mar/17  Updated: 23/Aug/19  Resolved: 21/Mar/17

Status: Closed
Project: Content Translation Support
Component/s: None
Affects Version/s: 2.1.6
Fix Version/s: 2.1.7

Type: Bug Priority: Critical
Reporter: Edwin Guilbert Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 6.5h
Original Estimate: Not Specified

Attachments: File testTranslation.yaml    
Issue Links:
causality
relation
is related to MGNLCTS-109 No export of MultiValueFields Open
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
Documentation update required:
Yes
Date of First Response:
Sprint: Basel 87, Basel 88
Story Points: 5

 Description   

When you use a composite field (two text fields for example) in a dialog of a component of a page, the field doesn't appear in the exported file of the page using the content translation module.

Steps to reproduce:

  1. Configure a dialog with a composite field and i18n enabled. Example attached.
  2. Use this dialog in a component inside a page with at least 2 languages configured.
  3. Export the page for translation using the content translation app (xls or csv).
  4. Open the exported file.

Result:
The file doesn't contain any rows for the field filled.

Expected result:
The file contains a row for each subfield (i18n enabled) of the composite field.

Note: The type info.magnolia.ui.form.field.definition.CompositeFieldDefinition was registered as control type to export.

This issue has been tested with textfields and/or select fields inside a composite field with either both i18n enabled or only one.

This issue has been tested with CompositeTransformer and DelegatingCompositeFieldTransformer.



 Comments   
Comment by Federico Grilli [ 14/Mar/17 ]

cmeier/Docuteam: worth adding some configuration example for Composite fields, I guess.

  • A composite field's subfields are exported for translation if
    • The type info.magnolia.ui.form.field.definition.CompositeFieldDefinition is registered as control type to export.
    • its subfields are configured as i18n==true

It is NOT necessary for the composite field itself to be i18n==true

For instance, given the following configuration

form:
  tabs:
    - name: tabText
      fields:
        - name: composite 
          label: Test
          layout: vertical
          class: info.magnolia.ui.form.field.definition.CompositeFieldDefinition
          transformerClass: info.magnolia.ui.form.field.transformer.composite.DelegatingCompositeFieldTransformer
          fields:
            - name: testText
              i18n: true
              description:
              label: Text
              class: info.magnolia.ui.form.field.definition.TextFieldDefinition
            - name: testText2
              description:
              label: Text 2
              class: info.magnolia.ui.form.field.definition.TextFieldDefinition

only testText will be exported, whereas testText2 is not, since it has no i18n: true. Should composite be i18n: true but its subfields not configured as i18n: true, then they would be ignored.

Comment by Federico Grilli [ 20/Mar/17 ]

QA before releasing CTS 2.1.7 uncovered a NPE bug due to the removal of a try catch block.

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