Several problems with navigation tree - not displaying subpages in documentTree macro

That’s because the HTTP request to get the tree nodes goes through the XWiki Rendering which by default applies the icon transformation and thus breaks the generated JSON. Here’s what the tree gets:

{
    "id":"document:xwiki-Hours.WebHome",
    "text":"D-Hours",
    "icon":"fa fa-file-o",
    "children":true,
    "data":{
       "id":"xwiki-Hours.WebHome",
       "type":"document",
       "validChildren":[
          "translations",
          "attachments",
          "attachment",
          "classProperties",
          "objects",
          "document",
          "pagination"
       ],
       "hasContextMenu":true,
       "draggable":true,
       "canDelete":true,
       "canMove":true,
       "canCopy":true,
       "createDocumentURL":"/xwiki/bin/create/D-Hours/WebHome"
    },
    "a_attr":{
       "href":"/xwiki/bin/view/D-Hours/"
    }
}

Simply because xwiki:D-Hours is transformed into “xwiki :smiley: -Hours” which is then rendered as plain text into xwiki-Hours.

The solution until we fix XWIKI-13167 is to disable the icon transformation.