Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-22618

The REST API query endpoint returns invalid page URLs for nested pages

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 16.4.3
    • REST
    • Unknown

    Description

      Steps to reproduce

      Run a query over REST which matches nested pages, for example all pages contained in space XWiki.EntityNameValidation:

      /xwiki/rest/wikis/xwiki/query?type=xwql&q=where doc.fullName like 'XWiki.EntityNameValidation%25'
      

      Actual result

      Here's a sample searchresult returned:

      <searchResult>
      <link href="http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/XWiki/EntityNameValidation/pages/Administration" rel="http://www.xwiki.org/rel/page"/>
      <type>page</type>
      [...]
      </searchResult>
      

      An occurrence of /spaces is missing between /XWiki and /EntityNameValdiation.

      Expected result

      <searchResult>
      <link href="http://localhost:8080/xwiki/rest/wikis/xwiki/spaces/XWiki/spaces/EntityNameValidation/pages/Administration" rel="http://www.xwiki.org/rel/page"/>
      <type>page</type>
      [...]
      </searchResult>
      

      Regression note

      XWiki 15.10.11 returns the expected search results.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              slauriere slauriere
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: