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

REST Delivery endpoint throws error when new asset used. Assets reference resolvers fail

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.4
    • Fix Version/s: 2.2.5
    • Component/s: delivery
    • Labels:
      None
    • Release notes required:
      Yes

      Description

      Steps to reproduce

      1.  Go to https://demo.magnolia-cms.com/
      2.  Upload new image in Assets app
      3. Go to https://demo.magnolia-cms.com/.magnolia/admincentral#app:tours:detail;/magnolia-travels/Vietnam--Tradition-and-Today:edit
      4. Change image to the newly uploaded one
      5. Go to https://demo.magnolia-cms.com/.rest/delivery/tours/v1/magnolia-travels/Vietnam--Tradition-and-Today

      Expected results

      Should get the JSON response with image.

      Actual results

      Get partial JSON response with error.
      ...
      ight even teach you to cook it too.</p>\n","destination":[

      {"@name":"asia","@path":"/destinations/asia","@id":"7ec72c48-c33f-418e-b2ff-44cfb4bbb1f2","@nodeType":"mgnl:category","name":"asia","level":"level-1","icon":"jcr:75874ebc-eabe-4b24-8da2-92251ec7fcb3","displayName":"Asia & the Pacific","image":"jcr:20e4d7f7-3160-4670-9acb-5c87231088dd","@nodes":[]}

      ],"duration":"14"{"error":{"code":"unknown","message":null}}

      Workaround

      I tried to change it to:

      referenceResolver:
            class: info.magnolia.rest.reference.jcr.JcrReferenceResolverDefinition
            targetWorkspace: dam
      

      But JcrReferenceResolverDefinition also does not seem to pick it up

      Do not use asset reference resolvers.
      But that's not really a good workaround

      Development notes

        Checklists

        Acceptance criteria

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                mgeljic Mikaël Geljić
                Reporter:
                bstaryga Bartosz Staryga
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Date of First Response:

                    Checklists

                    Bug DoR
                    DoD