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

Custom link processor and index sitemap items in configuration result in non selectable menu items while actually selected

    XMLWordPrintable

Details

    • Bug
    • Status: Review
    • Normal
    • Resolution: Unresolved
    • 15.6.1, 16.0.0
    • None
    • None
    • Flagged
    • Orion
    • Orion.Cycle8.Sprint
    • Small
    • Small (1-2)

    Description

      This bug is caused because of 2 issues and a 3rd edge case in client implementations.

      The first 2 issues are 
       # In org.hippoecm.hst.core.sitemenu.HstSiteMenuItemImpl line 109 compares the below 2 properties for equality
      hstSiteMapItemPath -> contains the URL from the menu item (this is the result of the doPostProcess because org.hippoecm.hst.pagecomposer.jaxrs.model.treepicker.DocumentTreePickerRepresentation (menu editor dialog) calls the link.create of the org.hippoecm.hst.platform.linking.DefaultHstLinkCreator which calls the postProcess method for all the create methods)
      currentPathInfo -> is the pathInfo property from the resolved sitemap item(contains the result of doPreProcess from link processor org.hippoecm.hst.platform.matching.BasicHstSiteMapMatcher line 78)
      This issue affects all wildcard items (any, default and index)
       # The currentPathInfo when the resolved sitemap item is an_index _ looks like "news/2024/08/the-medusa-news/_index _"
      This affects only index wildcard sitemap items because of BasicHstSiteMapMatcher line 165

      The edge case that might be observed is - (but this is expected in my opinion unless we change the way we store the menu item links) 

      When a menu item gets selected it takes custom link processors in mind and stores the result of doPostProcess. Which means menu items created and selected before the custom link processor was implemented do not adhere to the new URL structure.

      Find attached a plain archetype project with an example custom link processor implementation following the example from our documentation and the required sitemap configuration.

      Attachments

        Activity

          People

            jhoffman Jeroen Hoffman
            LKaramoulas Lef Karamoulas
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: