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

2 or more UploadFields cannot be used in the same App or Dialog

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Neutral
    • Resolution: Not an issue
    • Affects Version/s: 6.2.1
    • Fix Version/s: 6.2.4
    • Component/s: None
    • Labels:

      Description

      When more than to upload fields are defined in a Content app or in a dialog, when the dialog is saved just one of the uploaded files is saved. Upload fields save many properties, this properties are saved in JCR as separately properties instead as node with this properties. To do it the docu was follow: https://documentation.magnolia-cms.com/display/DOCS62/Upload+field

      Steps to reproduce
      1. Create a content app with two upload fields (see attached example).
      2. Open the app and create a new item uploading two diferent files.
      3. Save the new item.
      4. Open the item to edit it. Both upload fields are displaying the same file.

      Expected results
      Both uploaded files are stored separately and when opening the item to edit, both uploaded files are displayed.

      Actual results
      Only one of the uploaded files are stored in JCR, the last one.

      Workaround
      Not using two or more upload fields in the same dialog.
      Using info provided in MGNLUI-5656 it is working (maybe it was not documented??):

      upload:
       class: info.magnolia.ui.editor.UploadViewDefinition
       required: true
       itemProvider:
       $type: jcrChildNodeProvider
       nodeName: image1
      

      Development notes
      In JCR everything is stored at item level, the upload field name is not taken into account. It means that when storing the second uploaded file, the first values are overriden.

      damUploadField is also affected - MGNLDAM-880

        Checklists

        Acceptance criteria

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                sdemocko Šimon Demočko
                Reporter:
                miruela Mercedes Iruela
                Votes:
                1 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                    Checklists

                    Bug DoR
                    DoD

                      Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Remaining Estimate - Not Specified
                      Not Specified
                      Logged:
                      Time Spent - 1.5h
                      1.5h