Caching issue with document tree


I think I have a caching issue with a documentree.

I created a page (IncludedTree.vm) with the following velocity.

{{documentTree root="document:UserContent.WebHome" showAttachments=false openTo=document:$doc.title showRoot=true /}}

If I open this page I get a correct tree.

The velocity code is also called in

UserContent.SomePage by {{include reference='locationOfScript.includedTree.vm' /}}

Within UserContent.SomePage I had an Orphan: WebPreference.

On the UserContent.SomePage in the documentTree the deleted Page was shown in the tree:


I deleted the WebPreference. So I expect that UserContent.SomePage.DeletedPage would no longer show in the DocumentTree.

If I open the DocumentTree in the UserContent.SomPage the DeletedPage is still in the document tree.

If I open the DocumenTree in the includedScript.vm it is not shown.

Is this caching? And if so, how can I force this to be removed.

With regards

Hi Jurjen,

What version of XWiki do you have?


Hi Lavinia,



Hi @Oana-Lavinia_Florean ,

we are still having this issue. Any ideas?



Here you see the tree opened on the Location LOS-Instructies. Below in the tree you see again LOS-Instructies. The tree focusses directly on that item. Thinking it is clicked. If we inspect the HTML

The second image, shows the same tree. But opened in the parent of LOS-Instructies


What we tried so far:

  • Duplicate the whole data to test environment. Problem exists there as well

  • Empty the Recycled Bin

  • Deleting the Cache

  • Deleting any file in the store (Phyisical) with a reference to the Orphan

  • Deleting the Cache again

  • Recreating LOS-Instructies/Los-Instructies. Checking for children (not there)

  • Deleting this file again

  • Go through the whole cycle

  • Query the database fo any doc containing the name

  • Conclusion: There is no /LOS-Instructies/LOS-Instructies in the database anywhere.

Hi Jurjen,

Sorry for the late response. Did you looked in XWiki.RedirectClass ? Maybe there is a redirect remained from other operations.

Yes, it is empty. No entries there.

This is because you have openTo=document:$doc.title so the tree will focus on the current page

I tried and I couldn’t reproduce your issue on 12.3.

So when you open the tree in UserContent.SomePage the DeletedPage is still there. But does it have any children?
If not, can you check your user to see hidden pages and look at the tree again if there are any changes.

Did you looked in Page Index for UserContent.SomePage.DeletedPage and there are no other orphaned children?

This doesn’t make sense because the openTo parameter expects a document reference after ‘document:’ not the document title. Moreover, the document title (as well as the document reference) can have special characters (e.g. space) that will break the macro call. See xwiki-platform/xwiki-platform-core/xwiki-platform-panels/xwiki-platform-panels-ui/src/main/resources/Panels/Navigation.xml at master · xwiki/xwiki-platform · GitHub

## Escape special characters in macro parameter values.
#set ($openToDoc = $doc.documentReference.toString().replaceAll('([~"])', '~$1'))


The items have somehow disappeared. Will look into the openTo with a doc reference.Thank you

This does not work. $doc.title is correct

In the bulit in Navigation Panel it says openTo="document:$openToDoc"

Can you try this?