# Experience manager preview not working in some cases

**URL:** <https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383>\
**Category:** Experience Manager (PaaS/OnPrem)\
**Created:** [April 22, 2024, 9:42am UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383 "2024-04-22T09:42:20Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![maarten\_r](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/maarten_r/32/2003_2.png) [@maarten\_r](https://community.bloomreach.com/u/maarten_r)\
**Post date:** [April 22, 2024, 9:42am UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/1 "2024-04-22T09:42:21Z")

</div>

Hi,

we have a certain sitemap configuration that does not work with the experience manager preview functionality and are wondering whether customization options are available so we can make this work. Or what other advice we can get on the matter.

What I’m talking about is the following button:  
 ![image](https://canada1.discourse-cdn.com/flex027/uploads/bloomreach1/original/2X/4/49c953f0f91366fbe7e27108809f93623c4fe6d4.png)

It seems that the content path of the document cannot be properly translated to a sitemap item. As an example, this is a possible value of the `hst:relativecontentpath` property: `acties-claims/acties/acties/${1}-content/_artikelen/${2}`. I looked around with debugging tools to find out what is happening and noticed this is converted to `LocationMapTreeItem` objects. `${1}-content` converts to key value `_default_-content` and `${2}` to `_default_`. The latter receives the flag `isWildCard`, but the first does not. I suspect this is where the problem lies and why the content path cannot be mapped to a sitemap item. I suppose the wildcard elements are meant to be used as entire path segments, both for site urls and for content paths, and not as partial path segments. Still, we would like to know whether there are any customizations we can perform to make this work.

The other way works fine. When navigating to the url directly, the document located at the relative content path is found.

Thanks in advance!

Kind regards,  
Maarten

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [April 22, 2024, 12:35pm UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/2 "2024-04-22T12:35:01Z")

</div>

Can you share your sitemap configuration that serves this?

---

<div class="post-metadata">

**Author:** ![maarten\_r](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/maarten_r/32/2003_2.png) [@maarten\_r](https://community.bloomreach.com/u/maarten_r)\
**Post date:** [April 23, 2024, 7:52am UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/3 "2024-04-23T07:52:18Z")

</div>

Hi Jasper,

Here is a little screenshot with the information that I think is relevant:

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/bloomreach1/original/2X/e/ead4bdbf50edfa4f9250f52fa3aa3d58c6d16321.png)

And some yaml:

```auto
/hst:hst/hst:configurations/cbhippowebsite/hst:workspace/hst:sitemap/acties-claims:
  jcr:primaryType: hst:sitemapitem
  hst:componentconfigurationid: hst:pages/acties-claims-home
  hst:refId: acties-claims
  hst:relativecontentpath: acties-claims/homepage/acties-claims-homepage
  /acties:
    jcr:primaryType: hst:sitemapitem
    hst:componentconfigurationid: hst:pages/acties-claims-acties-home
    hst:refId: acties-claims-acties
    hst:relativecontentpath: acties-claims/acties/homepage/acties-homepage
    /_artikelen:
      jcr:primaryType: hst:sitemapitem
      hst:componentconfigurationid: hst:pages/errorpage
      hst:hiddeninchannelmanager: true
      hst:statuscode: 404
      /_default_:
        jcr:primaryType: hst:sitemapitem
        hst:componentconfigurationid: hst:pages/errorpage
        hst:statuscode: 404
        /_default_:
          jcr:primaryType: hst:sitemapitem
          hst:componentconfigurationid: hst:pages/acties-claims-acties-content
          hst:relativecontentpath: acties-claims/acties/acties/${1}-content/_artikelen/${2}

```

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [April 23, 2024, 8:00am UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/4 "2024-04-23T08:00:42Z")

</div>

HI,

That looks correct, so you may have found a bug. I have had a look through the code, and in one code path the _default_ is checked with contains and in another it is an exact match. Now these code paths serve different purposes and I haven’t traced all the interactions so I have not confirmed there is a bug, but your sitemap looks ok. I’ll try and do some testing today to see if I can confirm.

---

<div class="post-metadata">

**Author:** ![maarten\_r](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/maarten_r/32/2003_2.png) [@maarten\_r](https://community.bloomreach.com/u/maarten_r)\
**Post date:** [April 23, 2024, 9:08am UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/5 "2024-04-23T09:08:19Z")

</div>

Thanks for your help! I look forward to hearing your conclusions.

In case it helps, this is a screenshot I took while debugging.

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/bloomreach1/original/2X/4/4ef74f2add97870651f105aedd73c324171b3f6f.jpeg)

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [April 23, 2024, 1:05pm UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/6 "2024-04-23T13:05:39Z")

</div>

I haven’t had a lot of time to look at this, but I have tried to recreate your situation. I don’t think I quite got there, so I don’t have a conclusion for you. I do have some followup questions. What version are you running? How did you create that sitemap? Why is it in the workspace?

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [April 23, 2024, 1:11pm UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/7 "2024-04-23T13:11:04Z")

</div>

I did somewhat reproduce your situation though, so I do think your are correct that it doesn’t work. It is specifically the {1}-content it doesn’t like. I will create a bug report so it can be looked at more thoroughly than I can do right now.

---

<div class="post-metadata">

**Author:** ![maarten\_r](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/maarten_r/32/2003_2.png) [@maarten\_r](https://community.bloomreach.com/u/maarten_r)\
**Post date:** [April 24, 2024, 9:37am UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/8 "2024-04-24T09:37:02Z")

</div>

Hi Jasper,

Thanks for creating the bug report! Can it be viewed publicly in the Jira issue tracker? Or was it only created somewhere internally?

As for your questions, we are running Bloomreach enterprise version `15.2.3`. Interesting comment about the sitemap being in the workspace. As it is entirely developer maintained it should probably not be there. It was created by adding it to the repository-data bootstrap configuration. We’ll look into moving it outside of the workspace.

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [April 24, 2024, 12:21pm UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/9 "2024-04-24T12:21:18Z")

</div>

I was thinking if there was a workaround for your issue. You could possibly do something with [link processors](https://xmdocumentation.bloomreach.com/library/concepts/links-and-urls/customize-link-processing.html). Then you reduce your sitemap to using pure wildcards, but do the processing to add the -content in the link processor. Not 100% sure if that will work, but I think so.

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [April 25, 2024, 9:38am UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/10 "2024-04-25T09:38:50Z")

</div>

Forgot to add the link to the issue:  
[https://issues.onehippo.com/browse/CMS-15912](https://issues.onehippo.com/browse/CMS-15912)

---

<div class="post-metadata">

**Author:** ![maarten\_r](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/maarten_r/32/2003_2.png) [@maarten\_r](https://community.bloomreach.com/u/maarten_r)\
**Post date:** [April 25, 2024, 10:00am UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/11 "2024-04-25T10:00:49Z")

</div>

We do use custom link processors in the site application. I wasn’t aware they could be used in the cms application. Are you sure this could work? In that case, we will give it a try.

Thanks for the link to the issue!

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [April 25, 2024, 10:05am UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/12 "2024-04-25T10:05:34Z")

</div>

In the experience manager the site still has to go through hst processing. I’m fairly certain this will work, but it’s been some years since I implemented a link processor myself. I would suggest to do a simple test to verify this is a possible solution, but I can’t right now think of another.

---

<div class="post-metadata">

**Author:** ![maarten\_r](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/maarten_r/32/2003_2.png) [@maarten\_r](https://community.bloomreach.com/u/maarten_r)\
**Post date:** [October 3, 2024, 9:56am UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/13 "2024-10-03T09:56:47Z")

</div>

Hi @jasper.floor,  
We just took the time to implement your solution and it works, so thanks for that!

The only issue is that I only got it to work locally. When I change the `relativeContentPath` values in the sitemap to only use pure wildcards and add the link processor logic the preview button does not yet became available in the cms. It only works when I also completely remove the local repository folder and then start the application again, causing the repository to be rebuilt. In production this is a bit of an issue as it would take a long time to recreate the repository files. Do you have any insight in how we could force the new sitemap configuration to be loaded? When I use the debugger, I still see the “_default_-content” `LocationMapTreeItemImpl` showing up even while the sitemap no longer contains any node with `relativeContentPath` set to a value that contains something like `${1}-content`.

---

<div class="post-metadata">

**Author:** ![jasper.floor](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/jasper.floor/32/28_2.png) [@jasper.floor](https://community.bloomreach.com/u/jasper.floor)\
**Post date:** [October 3, 2024, 12:29pm UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/14 "2024-10-03T12:29:33Z")

</div>

Try deleting the preview configuration, though that should only affect the Experience Manager view. In the console, under the hst:myproject/hst:configurations delete any node with -preview. The only danger is loss of unpublished changes (changes in the experience manager, not content changes).

If you need to rebuild the index in production, you can do it once on one node and copy the index over. See [here](https://developers.bloomreach.com/library/enterprise/enterprise-features/lucene-index-export/lucene-index-export.html).

---

<div class="post-metadata">

**Author:** ![maarten\_r](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/maarten_r/32/2003_2.png) [@maarten\_r](https://community.bloomreach.com/u/maarten_r)\
**Post date:** [October 3, 2024, 12:51pm UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/15 "2024-10-03T12:51:18Z")

</div>

Of course, the preview nodes! They still contained the old configuration. Deleting them resolved the issue. Thanks!

---

<div class="post-metadata">

**Author:** ![Pselvam](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.bloomreach.com/pselvam/32/1888_2.png) [@Pselvam](https://community.bloomreach.com/u/Pselvam)\
**Post date:** [December 20, 2024, 7:09am UTC](https://community.bloomreach.com/t/experience-manager-preview-not-working-in-some-cases/4383/16 "2024-12-20T07:09:10Z")

</div>

Hi @maarten_r

We are happy you are part of Bloomreach Developer’s Community.  
Thank you for reaching out to us.  
We hope we have answered your queries and therefore marking this thread for Closure.  
Looking forward to your continuous contribution towards our vibrant Bloomreach Community.

Thank you
