Uploaded image for project: 'Hippo Site Toolkit 2'
  1. Hippo Site Toolkit 2
  2. HSTTWO-4611

_index_ sitemap item is matched when relative content path document is unpublished

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: 4.2.14, 5.6.4, 13.2.0
    • Fix Version/s: 5.6.5, 13.2.1, 13.3.0
    • Component/s: None
    • Labels:
      None
    • Similar issues:

      Description

      If the document that the relative content path of an __index__ points to is unpublished _++_the index sitemap item is still the one matched during matching phase and during rendering the component configuration of the index sitemap is used which evaluates to a page not found.

      org.hippoecm.hst.platform.matching.BasicHstSiteMapMatcher [line:170] the check uses .itemExists() for the handle of the document which always returns true for an existing document.

      Steps to reproduce

      1. Add an explicit sitemap item eg banners with an overview page configuration.
      2. Add an index sitemap item under the explicit banners with a detail page configuration and relative content path to an existing document.
      3. Depublish the document that index is pointing
      4. Visit localhost:8080/site/banners

      Expected

      As the document is not available the matching should fall back to the explicit sitemap item and the users see the banners overview page.

      Outcome

      User gets a page not found.

      Please see in the attached files an archetype (index.zip) with the reproduction of the issue.
      Available urls : http://localhost:8080/site/banners
      Publish/Depublish : Banner document under /content/documents/index/banners/index

      I have also attached a patch with a possible fix that seems to work.

        Attachments

        1. index.patch
          2 kB
        2. index.zip
          643 kB

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              LKaramoulas Lef Karamoulas
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: