Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-7106

Multivalue field in ContentEditor App fails with NPE - UI6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 6.2.19
    • 6.2.18
    • None

      When trying to include a multivalve field within a content editor block it fails when you try to save the content.

      Steps to reproduce

      1. Go to demo author and open Resources app
      2. Edit content-editor/blocks/text.yaml file
      3. Include the snippet:
        content-editor/blocks/text.yaml
        [...] Rest of default block code
        assignedSegments:
          $type: jcrMultiValueField
          field:
            $type: comboBoxField
            datasource:
              $type: jcrDatasource
              workspace: website 
      1. Save it and open the Stories app
      2. Create a new story and include a Set block
      3. On the new field included on step 3, select a page
      4. Try to save the story
      5. Check it fails

      Expected results

      The Story is saved successfully

      Actual results

      An exception is thrown (check attachments for full stack trace)

      Dev notes

      It only happens for the multiValue field, if you include another one, e.g, a multiField, it works:

      content-editor/blocks/text.yaml
      [...] Rest of default block code
      multi:
            i18n: true
            $type: jcrMultiField
            field:
              $type: compositeField
              properties:
                street:
                  $type: textField
                city:
                  i18n: true
                  $type: textField
      

        Acceptance criteria

              rkovarik Roman Kovařík
              ccantalapiedra Carlos Cantalapiedra
              Nucleus
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD