XWiki.Configurable
Failed to execute the [velocity] macro. Cause: [Error number 9001 in 3: The query [, BaseObject as obj, IntegerProperty as global where doc.fullName=obj.name and obj.className='XWiki.Configurable' and global.id=obj.id and global.name='configureGlobally' and global.value=0 and doc.space = ? order by doc.creationDate] requires programming right]. Click on this message for details.
org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Velocity Macro for content [#*
* This part takes the configuration from any documents containing XWiki.Configurable objects and creates a form
* for each. To includeForm this document, you may specify:
*
* $section - String - The section which we are administrating eg: "Registration", "Users", or "Import".
* If none is specified then it checks for a request parameter called "section" and uses that,
* if no parameter, then this code assumes that it is part of the admin icons sheet and adds icons
* for any section which is not in $sections, in that event, this code assumes it is being run
* inside of a <ul> block.
*
* $sections - List<String> - If section is not specified, any sections on this list will not have icons made for them
* the assumption being that the icons are already there. If section is specified then this
* is not taken into account and may safely be undefined.
*
* $currentDoc - String (document.fullName) - The administration document, users who don't have permission to edit
* it will not be able to include applications (possibly injecting
* arbitrary code.) if none specified then $doc.getFullName() is used.
*
* $globaladmin - boolean - If set true then we will assume we are administrationg the entire wiki.
* If not set then we look for a request parameter called "editor" if that exists and equals
* "globaladmin" then $globaladmin is true, if it doesn't exist then we check to see if
* $currentDoc.getFullName() equals "XWiki.XWikiPreferences".
*
* $doNotUnlockConfigurableDocuments - boolean - If true then this code will not make any attempt to unlock configurable
* documents. By default it does because it locks any document in the
* section which is being configured which would lead to a lot of stray
* locks if they weren't all cancelled. Only recommended if this page is
* being included twice in the same page.
*###
## Constants:
#set($redirectParameter = 'xredirect')
#set($nameOfThisDocument = 'XWiki.Configurable')
##
## Form submission depends on this.
$xwiki.jsfx.use('js/xwiki/actionbuttons/actionButtons.js', true)
##
#if(!$section)
#set($section = $request.getParameter('section'))
#end
#if(!$currentDoc)
#set($currentDoc = $doc.getFullName())
#end
## Get value of $globaladmin if not specified.
#if("$!globaladmin" == '')
#if($editor != 'globaladmin'
&& $request.getParameter('editor') != 'globaladmin'
&& $currentDoc != "XWiki.XWikiPreferences")
##
#set($globaladmin = false)
#else
#set($globaladmin = true)
#end
#end
#set($currentSpace = $xwiki.getDocument("$currentDoc").getSpace())
##
## This application should not run with programming rights because it evaluates code which may not be trustworthy.
## Removing the next line will open a security hole.
#sandboxDocument($nameOfThisDocument)
##
## This application locks every document in a section while that section is being edited so we should
## check for locks held by the current user on any of the applications configured here and remove them.
#if(!$doNotUnlockConfigurableDocuments)
#set($outputList = [])
#findNamesOfAppsToConfigure("", $globaladmin, $currentSpace, $outputList)
## We don't want to generate javascript which unlocks the current document just after we got finished locking it.
#set($discard = $outputList.remove($currentDoc))
#unlockDocuments($outputList)
#end
##
##------------------------------------------------------------------------------------------------------------
## If $section exists then we are viewing the admin page for a perticular section.
## eg: 'Registration', 'Presentation', 'Import' etc.
##------------------------------------------------------------------------------------------------------------
##
#if($section && $section != '')
##
## Searches the database for names of apps to be configured
#set($outputList = [])
#findNamesOfAppsToConfigure($section, $globaladmin, $xwiki.getDocument("$currentDoc").getSpace(), $outputList)
##
#foreach($appName in $outputList)
##
= $msg.get("admin.customize") __[[$appName>>$appName]]__: =
##
## Make sure the current user has permission to edit the configurable application.
#if(!$xcontext.hasAccessLevel('edit', $appName))
{{error}}$msg.get('xe.admin.configurable.noPermissionThisApplication'){{/error}}
#else
##
## Get the configurable application
#set($app = $xwiki.getDocument($appName))
##
## If the document was not last saved by a user with edit privilage on this page
## then we can't safely display the page but we should warn the viewer.
#set($hasAccess = false)
#checkDocumentSavedByAuthorizedUser($app, $currentDoc, $hasAccess)
#if(!$hasAccess)
{{error}}$msg.get('xe.admin.configurable.applicationAuthorNoAdmin', [$app.Author]){{/error}}
#else
##
## Locking document
##------------------------------------------------------------------------------------------------------------
#if($app.getLocked())
#set($locked = true)
#end
## If the document is locked and not by the current user and forceEdit is not set true,
#if($locked && $app.getLockingUser() != $xcontext.getUser() && !$request.getParameter('forceEdit'))
#set($requestURL = "$request.getRequestURL()")
#if($requestURL.indexOf("?") == -1)
#set($requestURL = "${requestURL}?")
#end
{{error}}$msg.get("doclockedby") $app.getLockingUser() [[$msg.get("forcelock")>>${requestURL}&forceEdit=1]]{{/error}}
#else
## If the document is not already locked, attempt to aquire the lock.
#if(!$locked)
## Try to use an ajax call to lock the document.
{{html clean=false wiki=true}}
</p><noscript>
{{warning}}$msg.get('xe.admin.configurable.cannotLockNoJavascript'){{/warning}}
</noscript>
<script type="text/javascript">
document.observe("dom:loaded", function() {
new Ajax.Request("$xwiki.getURL($app.getFullName(), 'lock', 'ajax=1')");
});
</script><p>
{{/html}}
#set($discard = $lockedDocumentNames.add($app.getFullName()))
#end
##------------------------------------------------------------------------------------------------------------
## Done Locking.
##
## Get all objects of the "Configurable" class from this document.
#set($allConfigurableObjs = $app.getObjects('XWiki.Configurable'))
## Seperate out the objects which are for this section.
#set($configurableObjs = [])
#foreach($configurableObj in $allConfigurableObjs)
#if($app.getValue('displayInSection', $configurableObj) == $section)
## If this is space admin, then don't display global, if global don't display space.
#if($globaladmin == ($app.getValue('configureGlobally', $configurableObj) == 1))
#set($discard = $configurableObjs.add($configurableObj))
#end
#end
#end
#if($configurableObjs.size() == 0)
## Internal error, not translated.
{{error}}Internal error: All objects were filtered out for application: $appName.{{/error}}
#else
#set($formAction = "$xwiki.getURL($app.getFullName(), 'save')")
#set($formId = "$section.toLowerCase()_$app.getFullName()")
#set($escapedAppName = $escapetool.html($app.getFullName()))
{{html clean=false wiki=false}}
#foreach($configurableObj in $configurableObjs)
## Display the header if one exists.
#set($heading = $app.getValue('heading', $configurableObj))
#if($heading && $heading != '')
{{/html}}
== #evaluate($heading) ==
{{html clean=false wiki=false}}
#end
## If the class specifies custom code to evaluate,
## then close the html macro, evaluate it and reopen the macro.
#set($codeToExecute = "$!app.getValue('codeToExecute', $configurableObj)")
#if($codeToExecute != '')
{{/html}}
#evaluate($codeToExecute)
{{html clean=false wiki=false}}
#end
##
## If propertiesToShow is set, then we will only show the properties contained therein.
#set($propertiesToShow = $app.getValue('propertiesToShow', $configurableObj))
#if(!$propertiesToShow || $propertiesToShow.getClass().getName().indexOf('List') == -1)
#set($propertiesToShow = [])
#end
##
## If linkPrefix is set, then we will make each property label a link which starts with that prefix.
#set($linkPrefix = "$!app.getValue('linkPrefix', $configurableObj)")
##
## If the Configurable object specifies a configuration class, use it,
## otherwise assume custom forms are used instead.
#set($configClassName = "$!app.getValue('configurationClass', $configurableObj)")
#if($configClassName != '')
#set($objClass = $xwiki.getDocument("$configClassName").getxWikiClass())
#if(!$objClass || $objClass.getClass().getName().indexOf('.Class') == -1)
{{/html}}
{{error}}$msg.get('xe.admin.configurable.configurationClassNonexistant'){{/error}}
{{html clean=false wiki=false}}
#else
## Use the first object from the document which is of the configuration class.
#set($obj = $app.getObject($objClass.getName()))
##
#if(!$obj || $obj.getClass().getName().indexOf('.Object') == -1)
{{/html}}
{{error}}
$msg.get('xe.admin.configurable.noObjectOfConfigurationClassFound',
[$objClass.getName(), $app.getFullName()])
{{/error}}
{{html clean=false wiki=false}}
#else
#define($formHtml)
## We don't begin the form until we have content for it so that a configurable can specify a
## custom form in codeToExecute and if that configurable object is the first of it's kind in that
## document, the custom form will not be put inside of our form.
#if(!$insideForm)
<form id="$formId" method="post" action="$formAction" onsubmit="cancelCancelEdit()">
<fieldset>
#set($insideForm = true)
#end
#foreach($propName in $objClass.getPropertyNames())
#if($propertiesToShow.size() > 0 && !$propertiesToShow.contains($propName))
## Silently skip over this property.
#else
<p>
#set($prettyName = "#evaluate($app.displayPrettyName($propName, $obj))")
## App Name is prepended to for= to make label work with id which is modified to prevent collisions.
<label for="${escapedAppName}_$objClass.getName()_0_$propName">
#if($linkPrefix != '')
#set($linkScript = "$linkPrefix$propName")
<a href="$escapetool.html("#evaluate($linkScript)")">$escapetool.html($prettyName)</a>
#else
$escapetool.html($prettyName)
#end
</label>
$obj.display($propName, "edit")
</p>
#end## If property is in propertiesToShow
#end## Foreach property in this class
#end## define $formHtml
## Strip pre tags and html macro invocations which $obj.display inserts.
## then prepend application name to ids to prevent id collissions.
$formHtml.toString().replaceAll('\{\{[/]?html[^}]*\}\}|<[/]?pre>', '').replaceAll(" id='", " id='${escapedAppName}_")
#end## If object exists
#end## If class exists
#end## If class name is specified.
#end## Foreach configurable object found in this document
## If a form was started then we end it.
#if($insideForm)
## We add in a redirect field to prevent the user from being carried away when they save
## if they don't have javascript.
#set($thisURL = $request.getRequestURL())
#if($request.getQueryString() && $request.getQueryString().length() > 0)
#set($thisURL = "${thisURL}?$request.getQueryString()")
#end
<input type="hidden" id="${escapedAppName}_redirect" name="$redirectParameter" value="$escapetool.html($thisURL)" />
</fieldset>
<div class="bottombuttons">
<p class="admin-buttons">
<span class="buttonwrapper">
## Text to display on the button
#set($buttonText = "$msg.get('admin.save') $escapedAppName")
<input class="button" type="submit" name="action_saveandcontinue" value="$buttonText" />
</span>
</p>
</div> ## bottombuttons
</form>
#set($insideForm = false)
#end
{{/html}}
#end## If there are configurable objects
#end## If document is not locked or forceEdit is enabled
#end## If app author has permission to edit admin page
#end## If the current user has permission to edit the configurable application.
#end## Foreach document name in names to configure
{{html clean=false wiki=false}}
<script type="text/javascript">
/* <![CDATA[ */
## Alt+Shift+S presses the first saveAndContinue button it finds, not what we want so we will disable edit shortcuts.
XWiki.actionButtons.EditActions = Object.extend(XWiki.actionButtons.EditActions, {addShortcuts : function() { }});
##
## TODO: cancel and "submit all" buttons.
//]]>
</script>
{{/html}}
##
##
#else
##
##------------------------------------------------------------------------------------------------------------
## If section is not set then we are viewing the main administration page.
##------------------------------------------------------------------------------------------------------------
##
## If there is no list called sections then we set sections to an empty list.
#if(!$sections || $sections.getClass().getName().indexOf("List") == -1)
#set($sections = [])
#end
##
## We have to create a list of documents which the current user doesn't have permission to view.
## So we can add an error messsage to the bottom of the page if there are any.
#set($appsUserCannotView = [])
##
## A list of sections (to be added) which the user is not allowed to edit, icons will be displayed with a message
#set($sectionsUserCannotEdit = [])
## List of sections to be added, in order by creationDate of oldest contained application.
#set($sectionsToAdd = [])
## Map of URL of icon to use by the name of the section to use that icon on.
#set($iconBySection = {})
##
#set($outputList = [])
#findNamesOfAppsToConfigure("", $globaladmin, $currentSpace, $outputList)
##
#foreach($appName in $outputList)
##
## Get the configurable application
#set($app = $xwiki.getDocument($appName))
##
## If getDocument returns null, then warn the user that they don't have view access to that application.
#if(!$app)
#set($discard = $appsUserCannotView.add($appName))
#end
##
#set($configurableObjects = $app.getObjects('XWiki.Configurable'))
#foreach($configurableObject in $configurableObjects)
#set($displayInSection = $app.getValue('displayInSection', $configurableObject))
##
## If there is no section for this configurable or if the section cannot be edited, then check if the
## application can be edited by the current user, if so then we display the icon from the current app and
## don't display any message to tell the user they can't edit that section.
#if(!$sections.contains($displayInSection) || $sectionsUserCannotEdit.contains($displayInSection))
##
## If there is no section for this configurable, then we will have to add one.
#if(!$sections.contains($displayInSection) && !$sectionsToAdd.contains($displayInSection))
#set($discard = $sectionsToAdd.add($displayInSection))
#end
##
## If an attachment by the filename iconAttachment exists and is an image
#set($attachment = $app.getAttachment("$app.getValue('iconAttachment', $configurableObject)"))
#if($attachment && $attachment.isImage())
## Set the icon for this section as the attachment URL.
#set($discard = $iconBySection.put($displayInSection, $app.getAttachmentURL($attachment.getFilename())))
#end
##
## If the user doesn't have edit access to the application, we want to should show a message on the icon
#if(!$xcontext.hasAccessLevel("edit", $app.getFullName()))
#if(!$sectionsUserCannotEdit.contains($displayInSection))
#set($discard = $sectionsUserCannotEdit.add($displayInSection))
#end
#elseif($sectionsUserCannotEdit.contains($displayInSection))
## If the user didn't have access to the section before but does have access to _this_ app which is
## configured in the section, then the section becomes accessable.
#set($discard = $sectionsUserCannotEdit.remove($displayInSection))
#end
#end## If section doesn't exist or user doesn't have access.
#end## Foreach configurable object in this app.
#end## Foreach application which is configurable.
##
## Now we go through sectionsToAdd and generate icons for them
#set($defaultIcon = $xwiki.getAttachmentURL('XWiki.Configurable', 'DefaultAdminSectionIcon.png'))
#if($globaladmin)
#set($queryString = "editor=globaladmin&section=")
#else
#set($queryString = "space=${currentSpace}&section=")
#if($request.getParameter('editor'))
#set($queryString = "editor=$escapetool.url($request.getParameter('editor'))&$queryString")
#end
#end
{{html clean=false wiki=false}}
#foreach($sectionToAdd in $sectionsToAdd)
#set($icon = $iconBySection.get($sectionToAdd))
#if(!$icon)
#set($icon = $defaultIcon)
#end
<li class="$escapetool.html($sectionToAdd).replaceAll(' ', '_')">
#set($hasAccess = !$sectionsUserCannotEdit.contains($sectionToAdd))
#if($hasAccess)
<a href="$xwiki.getURL($currentDoc, $xcontext.getAction(), "$queryString$escapetool.url($sectionToAdd)")">
#else
<a title="$msg.get('xe.admin.configurable.sectionIconNoAccessTooltip')">
#end
<img src="$icon" alt="$escapetool.html($sectionToAdd) icon"/>
$escapetool.html($sectionToAdd)
#if(!$hasAccess)
<br/><span class="errormessage">$msg.get('xe.admin.configurable.sectionIconNoAccess')</span>
#end
</a>
</li>
#end
{{/html}}
##
## Finally we display an error message if there are any applications which we were unable to view.
#if($appsUserCannotView.size() > 0)
{{error}}$msg.get('xe.admin.configurable.noViewAccessSomeApplications', [$appsUserCannotView]){{/error}}
#end
#end## If we should be looking at the main administration page.
##
##------------------------------------------------------------------------------------------------------------
## The Macros, nothing below this point is run directly.
##------------------------------------------------------------------------------------------------------------
##
#*
*
* Any documents which are on the provided list ($documentNames) which are locked by the current user will be unlocked.
* If this macro has programming rights, then they are unlocked programmatically, otherwise a javascript tag is
* generated with ajax calls to cancel for all of the documents. If there are documents on this list which are not
* locked by the current user, then they are ignored.
*
* @param $documentNames - List<String> - fullNames of documents which should be unlocked if they are locked by the
* current user.
*###
#macro(unlockDocuments $documentNames)
#if($documentNames.size() > 0)
#set($sql = "doc.fullName=")
#foreach($documentName in $documentNames)
#set($sql = "${sql}'$documentName' or doc.fullName=")
#end
## Trim the dangling ' or doc.fullName=?'
#set($sql = $sql.substring(0, $sql.lastIndexOf(' or doc.fullName=')))
#set($sql = ", XWikiLock lock where lock.docId=doc.id and lock.userName='$xcontext.getUser()' and (${sql})")
#set($namesOfdocumentsToUnlock = $xwiki.searchDocuments($sql))
## Use ajax and hope the user runs javascript.
{{html clean=false wiki=false}}
<script type="text/javascript">
document.observe("dom:loaded", function() {
#foreach($nameOflockedDocument in $namesOfdocumentsToUnlock)
new Ajax.Request("$xwiki.getURL($nameOflockedDocument, 'cancel', 'ajax=1')");
#end
});
</script>
{{/html}}
#end## If output list size > 0
#end## Macro
##
#*
* Find names of documents which contain objects of the class 'XWiki.Configurable'
*
* @param $section - String - Look for apps which specify that they should be configured in this section,
* if null or "" then returns them for all sections.
*
* @param $globaladmin - boolean - If true then we will look for applications which should be configured globally.
*
* @param $space - String - If not looking for apps which are configured globally, then this is the space where we
* will look for apps in. If null or "" or if $globaladmin is true, then all spaces will be
* searched.
*
* @param $outputList - List - The returns from this macro will be put in this list, passing the list as a parameter
* a safety measure because macros can't return values.
*###
#macro(findNamesOfAppsToConfigure, $section, $globaladmin, $space, $outputList)
## Use a parameterized sql query to prevent injection.
#set($params = [])
#if($section && $section != '')
#set($discard = $params.add("$section"))
#set($sqlA = ' StringProperty as section,')
#set($sqlB = " and section.id=obj.id and section.name='displayInSection' and section.value=?")
#else
## Make sure they are "" in case they were set prior to calling the macro.
#set($sqlA = '')
#set($sqlB = '')
#end
## Set up query based on value of $globaladmin
#if($globaladmin == true)
#set($sqlC = '1')
#else
#if($space && $space != '')
#set($sqlC = '0 and doc.space = ?')
#set($discard = $params.add($space))
#else
#set($sqlC = '0')
#end
#end
#set($sql = ", BaseObject as obj,$sqlA IntegerProperty as global where "
+ "doc.fullName=obj.name and obj.className='XWiki.Configurable'$sqlB "
+ "and global.id=obj.id and global.name='configureGlobally' and global.value=$sqlC "
+ "order by doc.creationDate")
##
## Run the search
#set($outputList = $xwiki.searchDocuments($sql, 0, 0, $params))
##
#end
##
#*
* If this document is saved with programming access or is includeForm'd into a document with programming, we have to
* drop programming rights in order for it to run safely because it evaluates potentially untrustworthy code.
*###
#macro(sandboxDocument)
#if($xcontext.hasProgrammingRights())
$xcontext.getContext().getDoc().setContentAuthor('XWiki.XWikiGuest')
#end
#end
##
#*
* Try to determine whether a document was edited by a user who has edit right on this page. This is trickey because
* documents are imported with the name XWiki.XWikiGuest who has no access to anything after import.
*
* @param theDoc - Document who's editor should be checked for edit access on this document.
*#
#macro(checkDocumentSavedByAuthorizedUser, $docToCheck, $currentDoc, $hasAccess)
## The system is started and the only user is XWikiGuest who has admin right but gives it up when he imports the default
## documents, we are checking to see if this looks like the guest imported the document with the first import.
#if($docToCheck.getWiki() == $xcontext.getMainWikiName()
&& $docToCheck.getVersion() == '1.1'
&& $docToCheck.getCreator() != $docToCheck.getContentAuthor()
&& $docToCheck.getContentAuthor() == 'XWiki.XWikiGuest')
##
#set($userToCheck = $docToCheck.getCreator())
#else
#set($userToCheck = $docToCheck.getAuthor())
#end
#set($hasAccess = $xwiki.hasAccessLevel("edit", $userToCheck, $currentDoc))
#end]
at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:186)
at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:60)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.evaluateBlock(AbstractScriptMacro.java:279)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:182)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:58)
at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:441)
at org.xwiki.rendering.internal.transformation.DefaultRenderingContext.transformInContext(DefaultRenderingContext.java:183)
at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:88)
at org.xwiki.display.internal.DocumentContentAsyncExecutor.executeInCurrentExecutionContext(DocumentContentAsyncExecutor.java:397)
at org.xwiki.display.internal.DocumentContentAsyncExecutor.execute(DocumentContentAsyncExecutor.java:269)
at org.xwiki.display.internal.DocumentContentAsyncRenderer.execute(DocumentContentAsyncRenderer.java:112)
at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:157)
at org.xwiki.rendering.async.internal.block.AbstractBlockAsyncRenderer.render(AbstractBlockAsyncRenderer.java:54)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:290)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.execute(DefaultBlockAsyncRendererExecutor.java:125)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:93)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:46)
at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:96)
at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:39)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:123)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:52)
at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:68)
at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:42)
at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:1432)
at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:1568)
at com.xpn.xwiki.doc.XWikiDocument.displayDocument(XWikiDocument.java:1518)
at com.xpn.xwiki.doc.XWikiDocument.displayDocument(XWikiDocument.java:1487)
at com.xpn.xwiki.api.Document.displayDocument(Document.java:822)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:704)
at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:75)
at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:242)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:190)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.xwiki.velocity.internal.directive.TryCatchDirective.render(TryCatchDirective.java:86)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
at org.apache.velocity.Template.merge(Template.java:358)
at org.apache.velocity.Template.merge(Template.java:262)
at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:233)
at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:107)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:219)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:174)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:135)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:54)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:284)
at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:284)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:907)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:869)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:856)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:811)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:803)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:79)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:73)
at org.xwiki.template.script.TemplateScriptService.render(TemplateScriptService.java:54)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:492)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:217)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:331)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:261)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
at org.apache.velocity.Template.merge(Template.java:358)
at org.apache.velocity.Template.merge(Template.java:262)
at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:233)
at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:107)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:219)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:174)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:135)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:54)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:284)
at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:284)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:907)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:869)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:856)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:811)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderNoException(InternalTemplateManager.java:803)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:79)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.renderNoException(DefaultTemplateManager.java:73)
at org.xwiki.template.script.TemplateScriptService.render(TemplateScriptService.java:54)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:492)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:217)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:331)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:261)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:190)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
at org.apache.velocity.Template.merge(Template.java:358)
at org.apache.velocity.Template.merge(Template.java:262)
at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:233)
at com.xpn.xwiki.internal.template.VelocityTemplateEvaluator.evaluateContent(VelocityTemplateEvaluator.java:107)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.evaluateContent(TemplateAsyncRenderer.java:219)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.renderVelocity(TemplateAsyncRenderer.java:174)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:135)
at com.xpn.xwiki.internal.template.TemplateAsyncRenderer.render(TemplateAsyncRenderer.java:54)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.lambda$syncRender$0(DefaultAsyncRendererExecutor.java:284)
at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.syncRender(DefaultAsyncRendererExecutor.java:284)
at org.xwiki.rendering.async.internal.DefaultAsyncRendererExecutor.render(DefaultAsyncRendererExecutor.java:267)
at org.xwiki.rendering.async.internal.block.DefaultBlockAsyncRendererExecutor.render(DefaultBlockAsyncRendererExecutor.java:154)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:907)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:869)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:849)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:835)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:91)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:85)
at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2570)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:180)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:651)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:339)
at com.xpn.xwiki.web.LegacyActionServlet.service(LegacyActionServlet.java:111)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:123)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:71)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:66)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:135)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:212)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.xwiki.container.servlet.filters.internal.SafeRedirectFilter.doFilter(SafeRedirectFilter.java:106)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.xwiki.container.servlet.filters.internal.ResolveRelativeRedirectFilter.doFilter(ResolveRelativeRedirectFilter.java:129)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.xwiki.container.servlet.filters.internal.SourceURLResolverFilter.doFilter(SourceURLResolverFilter.java:177)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:120)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:663)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:397)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with namespace [pulven:XWiki.Configurable]
at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:235)
at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:168)
... 191 more
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'searchDocuments' in class com.xpn.xwiki.api.XWiki threw exception com.xpn.xwiki.XWikiException: Error number 9001 in 3: Failed to validate the query [, BaseObject as obj, IntegerProperty as global where doc.fullName=obj.name and obj.className='XWiki.Configurable' and global.id=obj.id and global.name='configureGlobally' and global.value=0 and doc.space = ? order by doc.creationDate], requiring programming right at pulven:XWiki.Configurable[line 465, column 27]
at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:308)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:235)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:368)
at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:704)
at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:75)
at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:242)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:217)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:331)
at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:261)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:304)
at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:147)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:171)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:439)
at org.apache.velocity.Template.merge(Template.java:358)
at org.apache.velocity.Template.merge(Template.java:262)
at org.xwiki.velocity.internal.InternalVelocityEngine.evaluate(InternalVelocityEngine.java:233)
... 192 more
Caused by: com.xpn.xwiki.XWikiException: Error number 9001 in 3: Failed to validate the query [, BaseObject as obj, IntegerProperty as global where doc.fullName=obj.name and obj.className='XWiki.Configurable' and global.id=obj.id and global.name='configureGlobally' and global.value=0 and doc.space = ? order by doc.creationDate], requiring programming right
at com.xpn.xwiki.api.XWiki.checkSearchQueryAllowed(XWiki.java:737)
at com.xpn.xwiki.api.XWiki.searchDocuments(XWiki.java:886)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:571)
at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:554)
at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:221)
... 207 more
Caused by: com.xpn.xwiki.XWikiException: Error number 9001 in 3: The query [, BaseObject as obj, IntegerProperty as global where doc.fullName=obj.name and obj.className='XWiki.Configurable' and global.id=obj.id and global.name='configureGlobally' and global.value=0 and doc.space = ? order by doc.creationDate] requires programming right
at com.xpn.xwiki.api.XWiki.checkSearchQueryAllowed(XWiki.java:732)
... 213 more