Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-13877

HST Model loading does not merge DynamicParameters and FieldGroups correctly

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • None
    • 14.3.0
    • None
    • None

    Description

      In CMS-13875 the issue was fixed that deep copies of HstComponentConfigurations missed DynamicParameters and FieldGroups based on the order in which they were loaded.

      After that fix, some integration tests started to fail.

      This was related to the fix CMS-13875 however that fix was correct, but it triggered another loading issue of the DynamicParameters and FieldGroups : This time the merging of components related to DynamicParameters and FieldGroups is not correct.

      Assume we have an abstract page setup as follows:

          /hst:hst/hst:configurations/unittestcommon/hst:abstractpages:
            jcr:primaryType: hst:pages
            /basepage:
              jcr:primaryType: hst:component
              hst:template: webpage
              /header:
                jcr:primaryType: hst:component
                hst:referencecomponent: hst:components/header
              /leftmenu:
                jcr:primaryType: hst:component
                hst:referencecomponent: hst:components/leftmenu
      

      and

          /hst:hst/hst:configurations/unittestcommon/hst:components:
            jcr:primaryType: hst:components
            /header:
              jcr:primaryType: hst:component
              hst:componentclassname: org.hippoecm.hst.test.HeaderComponent
              hst:template: header
              /title:
                jcr:primaryType: hst:component
                hst:template: title
      

      then obviously, when an hst:page references the hst:abstractpages/basepage, it should get a header with hst:componentclassname: org.hippoecm.hst.test.HeaderComponent but also the correct DynamicParameters and FieldGroups

      It turned out that the classname and other fields were correctly merged, but not the DynamicParameters and FieldGroups .

      This should be done in HstComponentConfigurationService#populateComponentReferences . In HstComponentConfigurationService#combine, the merging behavior must also be improved to do more finegrained merging instead of all-or-nothing

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: