[MGNLUI-6274] Multivalue field is not displayed correctly if number nodes are not correlative Created: 06/Oct/20  Updated: 08/Feb/21  Resolved: 08/Feb/21

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.2.3
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Mercedes Iruela Assignee: Šimon Demočko
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File test-dialog.yaml    
Issue Links:
Relates
relation
is related to MGNLUI-6253 Allow MultiFields using jcrChildNodeP... Closed
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:

 Description   

Dialogs that contains a multivalue field is not displaying correctly the Multivalue field values if nodes are not correlative. It is not detected that there is a missing node and it is displayed in the dialog as an empty entry.

Steps to reproduce

  1. create a new dialog definition (see dialog definition attach)
  2. Open the dialog and include for entries using the multi value field.
  3. Go to JCR Browser and delete one of them in the middle
  4. Open the dialog again to see the current data

Expected result

Just the existing nodes are displayed

Current result

The deleted node is displayed in the dialog with missing values. The last node with content is not displayed.

Workaround

There is a groovy script that is fixing this nodes, this script has been created by the partner (Big Thanks!)

Dev notes

In Magnolia 5.7 this issue didn't happen, the deleted node is ignored and not displayed.
If the entry is removed from the dialog itself, the nodes are renumbered in the correct order.

Same issue is happeningg on 6.2.3 with the new UI 6 definition

form:
  properties: 
    itemsLex:
      $type: jcrMultiField
      itemProvider:
        $type: jcrChildNodeProvider
        supportI18N: false
      entryResolution:
        class: info.magnolia.ui.editor.ByLexicographicallyIndexedChildNodes$Definition
      orderHandler:
        class: info.magnolia.ui.editor.LexicographicallyIndexedJcrNodeOrderHandler$Definition
      field:
        $type: compositeField
        properties:
          text:
            $type: textField
          link:
            $type: textField


 Comments   
Comment by Roman Kovařík [ 06/Oct/20 ]

Could you attach a config (it's probably a jcrMultiPropertyValue field)?

Comment by Mercedes Iruela [ 06/Oct/20 ]

this dialog is using the compatibility mode - old UI5 style. I am checking now with the new UI.

Comment by Šimon Demočko [ 03/Dec/20 ]

Likely resolved by MGNLUI-6190, MGNLUI-6253.

Comment by Šimon Demočko [ 08/Feb/21 ]

Was resolved by tickets above.

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