Details
-
Bug
-
Resolution: Invalid
-
Major
-
None
-
3.4
-
xwiki hosted on linux with tomcat 6.
Browsers: Firefox, IE
-
velocity, sheets, hql, sql, rights
-
Unknown
-
N/A
-
N/A
-
Description
We got some strange behaviour when creating new pages based on a sheet that contains velocity-scripts with some hql-queries. New pages based on the sheet can be created by every user and nearly everything works fine, just the results of the select-statements doesn't show up. Seems that an empty resultset is returned. When storing the newly created page with admin-rights everything (including the queries) works fine.
Parts of the code with the query:
#set($sql = "select doc.fullName, doc.name from XWikiDocument as doc where (doc.hidden <> true or doc.hidden is null) and doc.space='${doc.space}' and doc.content like '%$doc.name%' order by doc.name asc")
#set($results=$xwiki.search($sql))
#if ($results.size() > 0)
... -> is empty when the page based on this sheet is saved without admin-rights