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

Sorting LiveTable by non-existent object property causes errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 14.8
    • LiveTable
    • None
    • Unknown

    Description

      Steps to Reproduce:

      1. Create a LiveTable using
        {{documents id="example" count="5" actions="false" columns="doc.title, before"/}}
      2. Click on the "before" column to sort by it
      3. Reload the current page

      Expected result:

      The document list is non-empty.

      Actual result:

      The document list is empty because the query produced an error. This can also be directly reproduced by opening http://localhost:8090/xwiki/bin/get/XWiki/LiveTableResults?outputSyntax=plain&transprefix=platform.index.&classname=&collist=doc.title%2Cbefore%2C_likes&queryFilters=currentlanguage%2Chidden&offset=1&limit=5&reqNo=2&sort=before&dir=asc.

      The main error is

      org.hibernate.hql.internal.ast.QuerySyntaxException: Invalid path: 'obj.id' [select elements(prop.list) from com.xpn.xwiki.doc.XWikiDocument as doc, com.xpn.xwiki.objects.BaseObject as tagobject, com.xpn.xwiki.objects.DBStringListProperty as prop, com.xpn.xwiki.objects.StringProperty prop_before  where (doc.hidden <> true or doc.hidden is null) and (tagobject.name=doc.fullName and tagobject.className='XWiki.TagClass' and tagobject.id=prop.id.id and prop.id.name='tags' and doc.translation=0 and 1=1  and obj.id=prop_before.id.id and prop_before.name = :prop_before_name)]
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            MichaelHamann Michael Hamann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: