Index: components/platform/src/main/java/org/hippoecm/hst/platform/matching/BasicHstSiteMapMatcher.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- components/platform/src/main/java/org/hippoecm/hst/platform/matching/BasicHstSiteMapMatcher.java (revision 11771bdaff262a9d163bbe2f0617e311e3c21c20) +++ components/platform/src/main/java/org/hippoecm/hst/platform/matching/BasicHstSiteMapMatcher.java (date 1559811364000) @@ -28,6 +28,7 @@ import org.hippoecm.hst.configuration.sitemap.HstSiteMap; import org.hippoecm.hst.configuration.sitemap.HstSiteMapItem; import org.hippoecm.hst.container.RequestContextProvider; +import org.hippoecm.hst.content.beans.ObjectBeanManagerException; import org.hippoecm.hst.core.linking.HstLink; import org.hippoecm.hst.platform.configuration.sitemap.HstSiteMapItemService; import org.hippoecm.hst.platform.linking.HstLinkImpl; @@ -167,7 +168,7 @@ // check whether the folder/document being referred to by the indexResolvedSiteMapItem exists : If so, use _index_ item as match String absolutePath = mount.getContentPath() + "/" + indexResolvedSiteMapItem.getRelativeContentPath(); try { - if (RequestContextProvider.get() != null && RequestContextProvider.get().getSession().itemExists(absolutePath)) { + if (RequestContextProvider.get() != null && RequestContextProvider.get().getObjectBeanManager(RequestContextProvider.get().getSession()).getObject(absolutePath) != null) { log.info("Use '{}' sitemap item below '{}' because content path '{}' for the '{}' item exists.", INDEX, getSiteMapItemPath(matchedSiteMapItem), absolutePath, INDEX); logMatchedItem(pathInfo, params, matchedSiteMapItem); @@ -179,6 +180,8 @@ } catch (RepositoryException e) { log.warn("Unable to get JCR session needed to check existing of the document belonging to the _index_ " + "sitemap item.", e); + } catch (ObjectBeanManagerException e){ + log.warn("ObjectBeanManager was unable to retrieve an object for path {}",absolutePath , e); } } }