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

The LiveData script service query() method doesn't honor the "sourceParameters" parameter

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 16.10.0
    • Live Data
    • None
    • Unknown

    Description

      Take the following script:

      #set ($properties = {
        'id' : 'moreLD',
        'properties' : 'doc.title',
        'source' : 'liveTable',
        'sourceParameters' : "className=DocApp.Code.DocumentationClass&resultPage=DocApp.Code.LandingPageLiveTableResults&translationPrefix=docapp.&location=$services.model.serialize($doc.documentReference.parent, 'local')"
      })
      $services.liveData.query($properties)
      
      {{html}}
        $services.liveData.render($properties)
      {{/html}}
      

      The call to render() works fine and displayed 0 results in my case, but the call to query()} returned 765 entries (ie all the pages of the wiki). The problem seems to be in {{StringLiveDataConfigurationResolver#resolve(liveDataConfigJSON)) which returns a LiveDataConfiguration object that doesn't contain the sourceParameters content.

      Attachments

        Activity

          People

            Unassigned Unassigned
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: