Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-40841

Using Page Tree Search in Confluence sidebar/header/footer shows hierarchical error and does not filter root page accordingly

    XMLWordPrintable

Details

    Description

      NOTE: This bug report is for Confluence Cloud. Using Confluence Server? See the corresponding bug report.

      Summary

      Page Tree Search macro root page search does not work as expected. Search is always done from the current page as root, instead of searching based on the configured root page

      Environment

      • Confluence 5.10.1

      Steps to Reproduce

      These are the steps I performed to reproduce the problem:

      1. create this page structure:
        • other page: othercontent (page id 557069)
        • parent page: parentcontent (page id 557065)
        • child page: childcontent (page id 557067)
      2. on parent page, create pagetreesearch macro wiki markup in all possible fields:
        Parent page root search:
        {pagetreesearch:root=parent page}
      3. navigate to other page and search for childcontent (should find)
        • actual result: search does not find anything (uses ancestorIds:557069 AND childcontent) – wrong
      4. navigate to child page and search for parentcontent (should find)
        • actual result: search does not find anything (uses ancestorIds:557067 AND parentcontent) – wrong
      • Note: this error happens regardless of the position of the pagetreesearch macro (header, footer, sidebar).

      Expected Results

      In all cases the search should have been "ancestorIds:557065 AND <content>", because the parent page id is 557065 and it is specified as the root in the pagetreesearch macro.

      Notes

      The pagetreesearch macro seems to work normally if embedded into the body of a page:

      1. Navigate to "other page"
      2. create pagetreesearch macro and point the search to start at root "child page"
      3. try to search for contents belonging to "child page"
        1. Results as expected: (ancestorIds:557067 AND childcontent) – correct

      As a test, I changed to default theme and configured wiki markup in sidebar, header, and footer. Got this error:

      The selected context is not a valid hierarchical page

      The error disappears after browsing around, but the problem remains the same – not possible to use the root page filter in this macro. Therefore, the problems happen both in the documentation and default theme.

      Note: This bug was updated to reflect that the pagetreesearch macro works in 5.10.1, but the root page function does not.

      Workaround

      There is no known direct workaround for this other than embedding the pagetreesearch macro in the actual pages (which defeats the purpose of having it available in the sidebar). The LiveSearch macro may be an alternative, but it does not allow filtering based on root page (only on space key and labels)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              smackie@atlassian.com Shannon S
              Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: