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

Filtering on wiki pretty name is broken in wikis index

    Details

    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Pull Request Status:
      Pull Request accepted
    • Similar issues:

      Description

      • start jetty/hsqldb
      • go to wiki index
      • put "t" (or anything else that cannot match) in the pretty name filter

      -> the request start and finish but nothing changes in the table which "t" obviously does not matched "Home". Also you can see errors in the log.

      Getting the following error:

      Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with id [xwiki:WikiManager.WikisLiveTableResults]
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:224)
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:198)
      	at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:124)
      	... 181 more
      Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'execute' in  class org.xwiki.query.internal.ScriptQuery threw exception org.xwiki.query.QueryException: Exception while executing query. Query statement = [, BaseObject as obj , StringProperty as prop_wikiprettyname  where obj.name=doc.fullName and obj.className = ? and doc.fullName <> ?  and obj.id = prop_wikiprettyname.id.id and prop_wikiprettyname.id.name = ? and upper(prop_wikiprettyname.value) like upper(?)  and doc.name IN ('XWikiServerPlatform','XWikiServerPlayground','XWikiServerPlaygroundtemplate','XWikiServerManager','XWikiServerTest','XWikiServerDev','XWikiServerCurriki','XWikiServerEnterprise','XWikiServerXwiki','XWikiServerExtensions','XWikiServerXclams','XWikiServerRendering','XWikiServerCommons','XWikiServerContrib','XWikiServerDesign')  order by wikiprettyname.value asc] at 2055:xwiki:WikiManager.WikisLiveTableResults[line 147, column 22]
      	at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:243)
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:187)
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
      	at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567)
      	at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71)
      	at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
      	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
      	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87)
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72)
      	at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311)
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230)
      	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207)
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:256)
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)
      	... 183 more
      Caused by: org.xwiki.query.QueryException: Exception while executing query. Query statement = [, BaseObject as obj , StringProperty as prop_wikiprettyname  where obj.name=doc.fullName and obj.className = ? and doc.fullName <> ?  and obj.id = prop_wikiprettyname.id.id and prop_wikiprettyname.id.name = ? and upper(prop_wikiprettyname.value) like upper(?)  and doc.name IN ('XWikiServerPlatform','XWikiServerPlayground','XWikiServerPlaygroundtemplate','XWikiServerManager','XWikiServerTest','XWikiServerDev','XWikiServerCurriki','XWikiServerEnterprise','XWikiServerXwiki','XWikiServerExtensions','XWikiServerXclams','XWikiServerRendering','XWikiServerCommons','XWikiServerContrib','XWikiServerDesign')  order by wikiprettyname.value asc]
      	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:175)
      	at org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:71)
      	at org.xwiki.query.internal.SecureQueryExecutorManager.execute(SecureQueryExecutorManager.java:67)
      	at org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:287)
      	at org.xwiki.query.internal.ScriptQuery.execute(ScriptQuery.java:237)
      	at sun.reflect.GeneratedMethodAccessor2621.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395)
      	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384)
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173)
      	... 207 more
      Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 3: Exception while hibernate execute
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:1305)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:1366)
      	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:156)
      	... 217 more
      Caused by: org.hibernate.hql.ast.QuerySyntaxException: Invalid path: 'wikiprettyname.value' [select distinct doc.fullName, wikiprettyname.value from com.xpn.xwiki.doc.XWikiDocument doc , com.xpn.xwiki.objects.BaseObject as obj , com.xpn.xwiki.objects.StringProperty as prop_wikiprettyname  where (doc.language is null or doc.language = '' or doc.language = 'en') and (obj.name=doc.fullName and obj.className = ? and doc.fullName <> ?  and obj.id = prop_wikiprettyname.id.id and prop_wikiprettyname.id.name = ? and upper(prop_wikiprettyname.value) like upper(?)  and doc.name IN ('XWikiServerPlatform','XWikiServerPlayground','XWikiServerPlaygroundtemplate','XWikiServerManager','XWikiServerTest','XWikiServerDev','XWikiServerCurriki','XWikiServerEnterprise','XWikiServerXwiki','XWikiServerExtensions','XWikiServerXclams','XWikiServerRendering','XWikiServerCommons','XWikiServerContrib','XWikiServerDesign') ) order by wikiprettyname.value asc]
      	at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:54)
      	at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:47)
      	at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:82)
      	at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:263)
      	at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:187)
      	at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:138)
      	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
      	at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
      	at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:124)
      	at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
      	at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
      	at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1770)
      	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.createHibernateQuery(HqlQueryExecutor.java:223)
      	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor$1.doInHibernate(HqlQueryExecutor.java:162)
      	at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor$1.doInHibernate(HqlQueryExecutor.java:157)
      	at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:1299)
      	... 219 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                acotiuga Alex Cotiugă
                Reporter:
                tmortagne Thomas Mortagne
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: