Uploaded image for project: 'Magnolia REST Framework'
  1. Magnolia REST Framework
  2. MGNLREST-738

Can't configure a reference resolver for multiple JcrMultiFields

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Blocker Blocker
    • None
    • 2.2.20
    • delivery
    • None

      Steps to reproduce

      1. Configure a page component containing multiple jcrMultiField, each pointing towards a different workspace (category and tours, for example)
            categories:
              $type: jcrMultiField
              field:
                $type: linkField 
                required: true 
                datasource: 
                  $type: jcrDatasource 
                  workspace: category
                  rootPath: /
                  allowedNodeTypes:
                    - mgnl:folder
                    - mgnl:category
            tours:
              $type: jcrMultiField
              field:
                $type: linkField 
                required: true 
                datasource: 
                  $type: jcrDatasource 
                  workspace: tours
                  rootPath: /
                  allowedNodeTypes:
                    - mgnl:folder
                    - mgnl:content
      1. Configure a REST endpoint to point towards the page containing it, trying to resolve both "field" fields from each jcrMultiField.
          - name: categoryList
            propertyName: field
            referenceResolver:
              $type: jcrReferenceResolver
              targetWorkspace: category    
              
          - name: toursList
            propertyName: field
            referenceResolver:
              $type: jcrReferenceResolver
              targetWorkspace: tours  
        
      1. Perform the REST request over a page with the configured page component

      Expected results

      Since targetWorkspace is defined for each reference resolver, I would expect both "field" properties to be correctly resolved.

      Actual results

      Only one of the properties is resolved, while the other is left untouched.

        Acceptance criteria

              Unassigned Unassigned
              rgaona Roberto Gaona
              DeveloperX
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:

                  Bug DoR
                  Task DoD