Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-7194

After decoration, new provider with invalid data (major severity) cause endpoints unregistered and not available.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Neutral
    • Resolution: Done
    • Affects Version/s: 5.6
    • Fix Version/s: 5.6.1
    • Component/s: None
    • Labels:
    • Sprint:
      Saigon 122, Saigon 123, Saigon 124, Saigon 125, Saigon 126
    • Story Points:
      3
    • Magnolia Release:
      5.6.1

      Description

      In a nutshell, I have two YAML files.
      light-modules/rest-test/restEndpoints/rest1.yaml

      class: info.magnolia.rest.delivery.jcr.v1.JcrDeliveryEndpointDefinition
      params:
        pages:
          workspace: website
          bypassWorkspaceAcls: true
          includeSystemProperties: false
          nodeTypes:
            0: mgnl:page
      

      and
      light-modules/add-features-1/decorations/rest-test/restEndpoints/rest1.yaml

      params:
        pages:
          nodeTypes:
            0: mgnl:page
            1: mgnl:component
      

      Although decoration shows error of parsing YAML, new provider is still sent in event. This is causing further processing which messes up the current config.

      Problems tab:

      Stack trace: stackTrace

      Light module to reproduce the issue: light-modules.zip


      This is a related issue. Firstly, the endpoint worked with list syntax ( - ).
      light-modules+2.zip

      After deleting the decoration module, the endpoint stopped working.

      info.magnolia.objectfactory.MgnlInstantiationException: Unable to resolve parameters for constructor public info.magnolia.rest.delivery.jcr.v1.JcrDeliveryEndpoint(info.magnolia.rest.delivery.jcr.v1.JcrDeliveryEndpointDefinition,javax.inject.Provider). Unresolved parameter(s) are: 1st parameter which is of type info.magnolia.rest.delivery.jcr.v1.JcrDeliveryEndpointDefinition
      

      Modifying the main YAML file made it work again.

        Attachments

        1. light-modules.zip
          40 kB
        2. light-modules+2.zip
          48 kB
        3. problemsTab.png
          problemsTab.png
          32 kB
        4. stackTrace
          4 kB

          Issue Links

            Activity

              People

              Assignee:
              dai.ha Dai Ha
              Reporter:
              dai.ha Dai Ha
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2d Original Estimate - 2d
                  2d
                  Remaining:
                  Remaining Estimate - 0d
                  0d
                  Logged:
                  Time Spent - 3d 1.5h
                  3d 1.5h