Uploaded image for project: '[Read Only] - Hippo Site Toolkit 2'
  1. [Read Only] - Hippo Site Toolkit 2
  2. HSTTWO-4269

For component rendering URLs which are for a container item, do not serialize the 'components' structure

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 5.3.0
    • None
    • None

    Description

      Currently, I think the serialization of component rendering URLs for component items is odd.

      for example if from http://localhost:8080/site/resourceapi I get (part of the response)

       "components": [
              {
                "id": "r60_r1_r2_r2_r1",
                "name": "banner1-ul",
                "type": "org.hippoecm.hst.demo.components.Banner",
                "label": "Banner1Ul",
                "_meta": {
                  "params": {
                    "ExampleComponentWindowCreationFilter.hide": "true",
                    "testParamFromMount": "testValue",
                    "param1": "value1",
                    "param2": "value2"
                  }
                },
                "_links": {
                  "componentRendering": "\/site\/resourceapi?_hn:type=component-rendering&_hn:ref=r60_r1_r2_r2_r1"
                }
              },
      

      and then call the component rendering URL http://localhost:8080/site/resourceapi?_hn:type=component-rendering&_hn:ref=r60_r1_r2_r2_r1, I get

      {
        "id": "r60_r1_r2_r2_r1",
        "_meta": {
          "definitionId": "hst:pages\/home\/body-hst:components\/bodyhome\/contenthst:components\/bodyhome\/content\/container-with-skipped-bannershst:components\/bodyhome\/content\/container-with-skipped-banners\/banner1-ul",
          "params": {
            "ExampleComponentWindowCreationFilter.hide": "true",
            "testParamFromMount": "testValue",
            "param1": "value1",
            "param2": "value2"
          }
        },
        "_links": {
          "self": "http:\/\/localhost:8080\/site\/resourceapi",
          "site": "http:\/\/localhost:8080\/site\/"
        },
        "containers": [
          {
            "components": [
              {
                "id": "r60_r1_r2_r2_r1",
                "name": "banner1-ul",
                "type": "org.hippoecm.hst.demo.components.Banner",
                "label": "Banner1Ul",
                "_meta": {
                  "params": {
                    "ExampleComponentWindowCreationFilter.hide": "true",
                    "testParamFromMount": "testValue",
                    "param1": "value1",
                    "param2": "value2"
                  }
                },
                "_links": {
                  "componentRendering": "\/site\/resourceapi?_hn:type=component-rendering&_hn:ref=r60_r1_r2_r2_r1"
                }
              }
            ]
          }
        ]
      }
      

      This does not make sense to me. The container item does not have containers, let alone that it has itself as container. Instead, the component rendering URL should return

              {
                "id": "r60_r1_r2_r2_r1",
                "name": "banner1-ul",
                "type": "org.hippoecm.hst.demo.components.Banner",
                "label": "Banner1Ul",
                "_meta": {
                  "params": {
                    "ExampleComponentWindowCreationFilter.hide": "true",
                    "testParamFromMount": "testValue",
                    "param1": "value1",
                    "param2": "value2"
                  }
                },
                "_links": {
                  "componentRendering": "\/site\/resourceapi?_hn:type=component-rendering&_hn:ref=r60_r1_r2_r2_r1"
                }     
      

      if you ask me (and potentially also content if there was some content contributed to the component item as well)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: