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

HstSiteMenuItemImpl creation caused by refid confusion

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Won't Fix
    • 10.1.0
    • None
    • cms7-project
    • None

    Description

      Version hst-core:3.1.0

      I had the following sitemap structure in my project:
      /account/personaldata (refId: personaldata)
      /personaldata (refId: personaldata_public)

      When the HstSiteMenuItemImpl was created this following line creates an invalid state:

       HstSiteMapItem siteMapItemByRefId = targetMount.getHstSite().getSiteMap().getSiteMapItemByRefId(siteMapItemRefIdOrPath);
                  
                  if (siteMapItemByRefId != null) {
                      hstSiteMapItemRefId = siteMapItemRefIdOrPath;
                      hstSiteMapItemPath = HstSiteMapUtils.getPath(siteMapItemByRefId);
      
                      log.debug("sitemapitem of sitemenu, '{}', found by refid, '{}'. sitemapitem path: " + hstSiteMapItemPath, name, siteMapItemRefIdOrPath);
                  } else {
                      hstSiteMapItemPath = siteMapItemRefIdOrPath;
      
                      log.debug("sitemapitem of sitemenu, '{}', will be found by path, '{}'.", name, siteMapItemRefIdOrPath);
                  }
      

      cause for the /personaldata it is first checked if a sitemapitem with a refId "personaldata" is existent. This leads to the conclusion that the /account/personaldata is found.

      I am now using a workaround for this problem and renamed the sitemapitem at /personaldata to a name for which no sitemapitem referenced by refid exists e.g. /personaldata_public

      Attachments

        Activity

          People

            Unassigned Unassigned
            koev Kevin Klein
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: