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

Query wiki is not fully taken into account

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 3.4
    • Fix Version/s: 4.0-milestone-1, 3.5.1
    • Component/s: Query
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      Description

      To reproduce

      {{velocity wiki="false"}}
      $services.query.xwql("select doc.content from Document doc, doc.object(Blog.BlogClass) as blog where blog.title='toto'").setWiki('xwiki').execute()
      {{/velocity}}
      

      on an empty wiki or any wiki without this class. It's failing complaining that it can't resolve "title" field.

      {{velocity wiki="false"}}
      $xcontext.setDatabase('xwiki')
      $services.query.xwql("select doc.content from Document doc, doc.object(Blog.BlogClass) as blog where blog.title='toto'").execute()
      {{/velocity}}
      

      works well (does not return any result since there is probably no blog entry with this title but it does not fail).

      Looks like executing request without any object (like something with only Document) works well.

        Attachments

          Activity

            People

            • Assignee:
              tmortagne Thomas Mortagne
              Reporter:
              tmortagne Thomas Mortagne
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: