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

Lookup to an HstComponentConfiguration instance cannot be done in page-composer by only the jcr node ID from the component

    XMLWordPrintable

Details

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

    Description

      In org.hippoecm.hst.pagecomposer.jaxrs.services.ContainerItemComponentServiceImpl#represent there is:

      final HstComponentConfiguration componentReference = componentConfigurations.values().stream() //TODO SS: Optimize loop
                      .filter(x -> x.getCanonicalStoredLocation().equals(componentCanonicalPath)).findFirst()
                      .orElseThrow(() -> new RuntimeException(String.format("Component representation is not found: '%s'", componentCanonicalPath)));
      

      above returns A HstComponentConfiguration that matches the jcr Path of componentItemNode. However, if the componentItemNode is a shared component (eg header banner), you get a random HstComponentConfiguration instance and MOST certainly not the one you clicked in the Channel Mgr.

      The above logic is not possible to implement correctly in that way: you cannot find the right HstComponentConfiguration instance from just the node id. Instead, we should create a service similar to org.hippoecm.hst.experiencepage.ExperiencePageService#loadExperiencePageComponentItem only then for loading a SINGLE disconnected from the HstModel HstComponentConfiguration on the fly

      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: