Velocity errors on all administration pages

Had to perform a restore on our DB and physical volume last night. All pages are available and visible except the admin preferences. Need to get these viewable again.
version is 10.11.4

image

The long error is:
org.xwiki.rendering.macro.MacroExecutionException: Failed to evaluate Velocity Macro for content [#if ($request.xaction == ‘switchContext’)
$response.sendRedirect($request.target)
#stop
#end

#set ($adminAction = ‘admin’)
#set ($crtCategoryId = “$!{request.category}”)
#if ($crtCategoryId != ‘’)
#set ($crtCategoryId = $mathtool.toInteger($crtCategoryId))
#end
#set ($crtSectionId = “$!{request.section}”)

Admin menu map

displayInSection: menu.name | sectionOrder: 200 | page: Menu.MenuConfigurationSection

displayInSection: panels.applications | sectionOrder: 400 | page: PanelsCode.ApplicationsPanelConfigurable

displayInSection: panels.navigation | sectionOrder: 500 | page: PanelsCode.NavigationConfigurationSection

#set($adminMenu = [
{
‘id’ : ‘lf’,
‘icon’: ‘columns’,
‘displayBeforeCategory’: ‘content’,
‘children’: [
{‘id’ : ‘Themes’, ‘perSpace’ : true, ‘order’ : 100},
{‘id’ : ‘Panels.PanelWizard’, ‘perSpace’ : true, ‘order’ : 300},
{‘id’ : ‘Presentation’, ‘perSpace’ : true, ‘order’ : 600}
]
},
{
‘id’ : ‘usersgroups’,
‘icon’: ‘group’,
‘displayBeforeCategory’: ‘extensionmanager’,
‘children’: [
{‘id’ : ‘Users’, ‘order’ : 100},
{‘id’ : ‘Groups’, ‘order’ : 200},
{‘id’ : ‘Rights’, ‘perSpace’ : false, ‘order’ : 300},
{‘id’ : ‘PageAndChildrenRights’, ‘perSpace’ : true, ‘order’ : 300, ‘global’: false},
{‘id’ : ‘PageRights’, ‘perSpace’ : true, ‘order’ : 350, ‘global’: false},
{‘id’ : ‘UserProfile’, ‘order’ : 400},
{‘id’ : ‘Registration’, ‘order’ : 500}
]
},
{
‘id’ : ‘other’,
‘icon’: ‘wrench’,
‘children’ : []
}
])

Fill in the list of custom applications to configure

#findCustomSectionsToConfigure($adminMenu)

Filter only the sections that are valid in the context

#set ($categoriesToRemove = [])
#foreach ($category in $adminMenu)
#set ($sectionsToRemove = [])
#foreach ($section in $category.children)
#if ($editor == ‘spaceadmin’ && !$section.perSpace)
#set ($discard = $sectionsToRemove.add($section))
#elseif ($editor == ‘globaladmin’ && “$!section.global” == “false”)
## For retro-compatibility, all sections are global unless the ‘global’ field is explicitly marked as false
#set ($discard = $sectionsToRemove.add($section))
#end
#end
#set ($discard = $category.children.removeAll($sectionsToRemove))
#if ($category.children.size() == 0)
#set ($discard = $categoriesToRemove.add($category))
#end
#end
#set ($discard = $adminMenu.removeAll($categoriesToRemove))
#if ("$!crtCategoryId" != ‘’ && $crtCategoryId >= $adminMenu.size())
#set ($crtCategoryId = ‘’)
#end

Prepare the Admin menu map for processing

#set ($filteredAdminMenu = [])
#set ($crtSection = $NULL)
#set ($crtCategory = $NULL)
#foreach ($category in $adminMenu)

“Standard” URLs and icons for categories

#set ($category.url = $xwiki.getURL($currentDoc, $adminAction, “category=${mathtool.sub($velocityCount, 1)}”))
#if ($xwiki.getDocument(‘XWiki.AdminSheet’).getAttachment("${category.id}.png"))
#set ($category.iconReference = “XWiki.AdminSheet@${category.id}.png”)
#else
#set ($category.iconReference = “XWiki.ConfigurableClass@DefaultAdminSectionIcon.png”)
#end
#set ($category.description = $services.localization.render(“admin.${category.id}.description”).trim())
#set ($category.cssClass = “${category.id}Icon”)
#set ($category.name = $services.localization.render(“admin.${category.id}”).trim())
#if ("$!{crtCategoryId}" != ‘’ && $velocityCount == $mathtool.add($crtCategoryId, 1))
#set ($crtCategory = $category)
#end

Process each admin section

#set ($filteredCategoryChildren = [])
#foreach ($section in $category.children)
#if ($xwiki.exists($section.id) || $xwiki.exists(“XWiki.Admin${section.id}Sheet”))
#if ($crtSectionId == $section.id)
#set ($crtSection = $section)
#set ($crtCategory = $category)
#end
#set ($section.iconReference = ‘’)
#if ($section.id.indexOf(’.’) > 0)
#set ($sectionDoc = $xwiki.getDocument($section.id))
#set ($section.name = $sectionDoc.getDisplayTitle())
#if ($sectionDoc.getAttachment(‘icon.png’))
#set ($section.iconReference = “${sectionDoc}@icon.png”)
#else
#set ($section.iconReference = ‘XWiki.ConfigurableClass@DefaultAdminSectionIcon.png’)
#end
#else
#set ($sectionDoc = $xwiki.getDocument(‘XWiki.AdminSheet’))
#set ($section.name = $services.localization.render(“admin.${section.id.toLowerCase()}”))
#set ($iconName = “${section.id.toLowerCase()}.png”)
#if ($sectionDoc.getAttachment($iconName))
#set ($section.iconReference = “${sectionDoc}@${iconName}”)
#else
#set ($section.iconReference = ‘XWiki.ConfigurableClass@DefaultAdminSectionIcon.png’)
#end
#end
#set ($query = “editor=$escapetool.url(${editor})&section=$escapetool.url(${section.id})”)
#if ($editor != ‘globaladmin’)
#set ($query = $query + “&space=$escapetool.url(${currentSpace})”)
#end
#set ($action = “$!{section.action}”)
#if ($action == ‘’)
#set ($action = $adminAction)
#end
#set ($section.url = $xwiki.getURL($currentDoc, $action, $query))
#set ($key = “admin.${section.id.toLowerCase()}.description”)
#if ($services.localization.get($key))
#set ($section.description = $services.localization.render($key))
#end
#set ($discard = $filteredCategoryChildren.add($section))
#elseif ($section.configurable)
#if ($section.readOnly)
#set ($section.cssClass = ‘readOnly’)
#end
#if ($crtSectionId == $section.id)
#set ($crtSection = $section)
#set ($crtCategory = $category)
#end
#set ($discard = $filteredCategoryChildren.add($section))
#end
#end
#set ($category.children = $filteredCategoryChildren)
#if ($filteredCategoryChildren.size() > 0)
#set ($discard = $filteredAdminMenu.add($category))
#end
#end
#set ($adminMenu = $filteredAdminMenu)

Mark the active category/section. We use this flag when displaying the menu.

#if ($crtCategory)
#set ($crtCategory.active = true)
#if ($crtSection)
#set ($crtSection.active = true)
#else
#set ($crtSectionId = $NULL)
#end
#else
#set ($crtCategoryId = $NULL)
#end

#**

  • Displays the sections from an administration category
  • Expected format:
  • sections = vector of items
  • item = map with the following fields:
  •    'id'       : mandatory
    
  •    'name'     : the text displayed for the corresponding menu item;
    
  •                 optional, defaults to
    
  •                 $services.localization.render("$!{translationPrefix}${item.id}")
    
  •    'description' : the description displayed for the corresponding section;
    
  •                 optional
    
  •    'link'     : the "action" of the menu item; mandatory
    
  •    'cssClass' : a specific css class for the menu item for custom
    
  •                 styling; optional, defaults to ''
    
  • @param $sections the sections list, in the format described above
  • @param $translationPrefix the translation prefix added to the id of each
  •    item, in order to generate the name and description; ignored when
    
  •    name or description are specified
    

*#
#macro(admin_displayCategory $sections $translationPrefix)
(% class=“admin-category” %)
#set ($sortedSections = [])
#sortCollectionOfMapsByField($sections, ‘order’, 9999, ‘asc’, $sortedSections)
#foreach ($section in $sortedSections)
* [[[[image:${section.iconReference}]] ${section.name}>>path:${section.url}]] (% class=“description” %)$!{section.description}
#end
#end

#**

  • Displays the administration categories
  • Expected format:
  • sections = vector of items
  • item = map with the following fields:
  •    'id'       : mandatory
    
  •    'name'     : the text displayed for the corresponding menu item;
    
  •                 optional, defaults to
    
  •                 $services.localization.render("$!{translationPrefix}${item.id}")
    
  •    'description' : the description displayed for the corresponding section;
    
  •                 optional
    
  •    'link'     : the "action" of the menu item; mandatory
    
  •    'cssClass' : a specific css class for the menu item for custom
    
  •                 styling; optional, defaults to ''
    
  • @param $sections the sections list, in the format described above
  • @param $translationPrefix the translation prefix added to the id of each
  •    item, in order to generate the name and description; ignored when
    
  •    name or description are specified
    

*#
#macro(admin_displayCategories $adminMenu $translationPrefix)
(% class=“admin-category” %)
#foreach ($category in $adminMenu)
* [[[[image:${category.iconReference}]] ${category.name}>>path:${category.url}]] (% class=“description” %)$!{category.description}
#end
#end

#macro (verticalNavigation $menu $options)
{{html clean=“false”}}

$services.localization.render('search')
#foreach ($item in $menu) #verticalNavigationItem($item $options) #end
$escapetool.xml($services.localization.render('administration.menu.search.noResults'))
{{/html}} #end

#macro (verticalNavigationItem $item $options)
#set ($escapedId = $escapetool.xml($item.id))
#set ($name = “$!item.name”)
#if ($name == ‘’)
#set ($name = $services.localization.render("$!options.translationPrefix$item.id"))
#end
#set ($isActive = $item.active == true)
#set ($hasChildren = $item.children && $item.children.size() > 0)
#if ($hasChildren)
#set ($children = [])
#sortCollectionOfMapsByField($item.children, ‘order’, 99999, ‘asc’, $children)


<a class=“panel-heading#if (!$isActive) collapsed#end” role=“tab” id=“panel-heading-$escapedId”
href="$!item.url" data-toggle=“collapse”#if ("$!options.id" != ‘’) data-parent="#$options.id" #end
data-target="#panel-body-$escapedId" aria-expanded="$isActive" aria-controls=“panel-body-$escapedId”
title="$!escapetool.xml($item.description)">$!services.icon.renderHTML($item.icon)$escapetool.xml($name)


#foreach ($child in $children)
#verticalNavigationItem($child $options)
#end



#else
$!services.icon.renderHTML($item.icon)$escapetool.xml($name)
#end
#end]
at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:139)
at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:52)
at org.xwiki.rendering.macro.script.AbstractScriptMacro.evaluateBlock(AbstractScriptMacro.java:286)
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:297)
at org.xwiki.rendering.internal.transformation.DefaultRenderingContext.transformInContext(DefaultRenderingContext.java:183)
at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:101)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:263)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:133)
at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:58)
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:245)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.applySheet(SheetDocumentDisplayer.java:225)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.maybeDisplayWithSheet(SheetDocumentDisplayer.java:180)
at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:111)
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.script.display.DisplayScriptService.document(DisplayScriptService.java:143)
at com.xpn.xwiki.script.display.DisplayScriptService.content(DisplayScriptService.java:206)
at com.xpn.xwiki.script.display.DisplayScriptService.content(DisplayScriptService.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369)
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.parser.node.SimpleNode.render(SimpleNode.java:342)
at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:259)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)
at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:358)
at com.xpn.xwiki.internal.template.InternalTemplateManager.evaluateContent(InternalTemplateManager.java:874)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:750)
at com.xpn.xwiki.internal.template.InternalTemplateManager.lambda$renderFromSkin$0(InternalTemplateManager.java:725)
at com.xpn.xwiki.internal.security.authorization.DefaultAuthorExecutor.call(DefaultAuthorExecutor.java:98)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:724)
at com.xpn.xwiki.internal.template.InternalTemplateManager.renderFromSkin(InternalTemplateManager.java:703)
at com.xpn.xwiki.internal.template.InternalTemplateManager.render(InternalTemplateManager.java:689)
at com.xpn.xwiki.internal.template.DefaultTemplateManager.render(DefaultTemplateManager.java:78)
at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:2317)
at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:179)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:489)
at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:210)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:112)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:109)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:134)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:660)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:798)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with id [xwiki:XWiki.AdminSheet]
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:227)
at com.xpn.xwiki.render.DefaultVelocityManager.evaluate(DefaultVelocityManager.java:358)
at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:131)
… 95 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 category, IntegerProperty as sectionOrder, IntegerProperty as global where obj.name = doc.fullName and obj.className = :className and category.id = obj.id and category.name = ‘displayInCategory’ and sectionOrder.id = obj.id and sectionOrder.name = ‘sectionOrder’ and global.id = obj.id and global.name = ‘configureGlobally’ and global.value = :global order by case when category.value is null or category.value = ‘’ then 1 else 0 end, category.value, sectionOrder.value] at 34:xwiki:XWiki.AdminSheet[line 85, column 99]
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.ASTMethod.execute(ASTMethod.java:151)
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.SimpleNode.render(SimpleNode.java:342)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluateInternal(DefaultVelocityEngine.java:259)
at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:222)
… 97 more
Caused by: org.xwiki.query.QueryException: Exception while executing query. Query statement = [, BaseObject as obj, StringProperty as category, IntegerProperty as sectionOrder, IntegerProperty as global where obj.name = doc.fullName and obj.className = :className and category.id = obj.id and category.name = ‘displayInCategory’ and sectionOrder.id = obj.id and sectionOrder.name = ‘sectionOrder’ and global.id = obj.id and global.name = ‘configureGlobally’ and global.value = :global order by case when category.value is null or category.value = ‘’ then 1 else 0 end, category.value, sectionOrder.value]
at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:195)
at org.xwiki.query.internal.DefaultQueryExecutorManager.execute(DefaultQueryExecutorManager.java:72)
at org.xwiki.query.internal.SecureQueryExecutorManager.execute(SecureQueryExecutorManager.java:67)
at org.xwiki.query.internal.DefaultQuery.execute(DefaultQuery.java:296)
at org.xwiki.query.internal.ScriptQuery.execute(ScriptQuery.java:245)
at sun.reflect.GeneratedMethodAccessor522.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
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)
… 117 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:927)
at com.xpn.xwiki.store.XWikiHibernateBaseStore.executeRead(XWikiHibernateBaseStore.java:990)
at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.execute(HqlQueryExecutor.java:177)
… 127 more
Caused by: org.hibernate.QueryParameterException: Position beyond number of declared ordinal parameters. Remember that ordinal parameters are 1-based! Position: 1
at org.hibernate.engine.query.ParameterMetadata.getOrdinalParameterDescriptor(ParameterMetadata.java:81)
at org.hibernate.engine.query.ParameterMetadata.getOrdinalParameterExpectedType(ParameterMetadata.java:87)
at org.hibernate.impl.AbstractQueryImpl.determineType(AbstractQueryImpl.java:444)
at org.hibernate.impl.AbstractQueryImpl.setParameter(AbstractQueryImpl.java:416)
at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.populateParameters(HqlQueryExecutor.java:391)
at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor.createHibernateQuery(HqlQueryExecutor.java:221)
at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor$1.doInHibernate(HqlQueryExecutor.java:183)
at com.xpn.xwiki.store.hibernate.query.HqlQueryExecutor$1.doInHibernate(HqlQueryExecutor.java:178)
at com.xpn.xwiki.store.XWikiHibernateBaseStore.execute(XWikiHibernateBaseStore.java:921)
… 129 more

The hibernate error in question actually comes from an included page XWiki.ConfigurableClassMacros

Can you please go to ‘…/xwiki/bin/view/XWiki/ConfigurableClassMacros?viewer=history’ and check if the history page proposes to compare to Administration Application 10.11.4, and if there are any differences of the current page to that version?

Thank you Clemens, Yes there does seem to be an edit of the admin UI. Our restore was due to a failed upgrade to 11.6.
So is this inferring that part of the file is pointing to the 11.6 extension?

image
Looks like i can only upload one image so I will post with the second image.

Second Image
image

You might want to roll back that page to the version that 10.11.4 wants. In theory you can also use the Extension Manager in the Admin UI to downgrade the Administration Application to 10.11.4 … except that the Admin UI is broken and thus the extension manager not accessible.

So a manual rollback to the 10.11.4 version of that page via the page history is hopefully the first step to recover the broken Admin UI.

Thank you again for this awesome help. Unfortunately it appears that page is affected as well. It’s possible I don’t have the correct location. This is what I tried to use to get there
/bin/admin/XWiki/XWikiPreferences?viewer=history&

image

You need to use /bin/view/XWiki/XWikiPreferences?viewer=history& to get to the history of the preferences page. However this contains only configuration information, please do not revert this to the one coming from any extension.

Instead the next try will be the admin sheet: /bin/view/XWiki/AdminSheet?viewer=history
Is there a difference to the version coming from the Admin application?

I apologize for my ignorance on where things are located. I found the history paged i needed and restored it. It appears that was what I needed to do. I now have all my admin pages back.
Thank you so much for the help!!!

Ah, nice! No need to apologize; it takes some time to find one’s way around if one has to look under the hood how things are working.

In principle you can now check for more things to roll back; for this go via the “Extensions” section of the admin and search for “Administration Application” while choosing “Installed Extensions”. This should show you the Administration Application (and the “Rendering Administration Application”, too, please ignore that for now). The Button “Uninstall” has a small arrow right to it; if you click on this arrow you can also choose “Compute Changes”. This should tell you if there are other changes to the Admin UI that you might want to roll back to the proper version.

It does look like there are some differences in a few pages. I will take a look at these. Doesn’t look like it is anything breaking at this point but I will look it over.
Again, thank you again for the excellent help.
Kevin