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

Query wiki is not fully taken into account

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • 4.0-milestone-1, 3.5.1
    • 3.4
    • Query
    • None
    • Unknown

    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

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

            Dates

              Created:
              Updated:
              Resolved: