Hello,
I'm trying to improve searching in conflunence by adding addsearch-category (see below) to main.vmd. I have tested it in our dev environment and it worked fine but when I tried to apply it in my production environment something went wrong (most likely while copying it over) and as a result of I'm not able to access admin pages for layouts.
The addition I've made is in bold:
...
#else
<title>$title - #siteTitle()</title>
#end
##Set AddSearch category
<meta id=search-category name="addsearch-category" content="$sitemeshPage.getProperty("page.spacename")" >
#requireResource("confluence.web.resources:print-styles")
#requireResourcesForContext("main")
...
When I try to access /admin/listdecorators.action I get System Error:
Cause
org.apache.velocity.exception.MethodInvocationException: Invocation of method 'hasTemplate' in class com.atlassian.confluence.admin.actions.lookandfeel.EditDecoratorAction threw exception java.util.concurrent.CompletionException: java.lang.IllegalStateException: Duplicate key com.atlassian.confluence.core.PersistentDecorator@4b592a3b at /includes/common-listdecorators.vm[line 31, column 30]
at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
caused by: java.util.concurrent.CompletionException: java.lang.IllegalStateException: Duplicate key com.atlassian.confluence.core.PersistentDecorator@4b592a3b
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
caused by: java.lang.IllegalStateException: Duplicate key com.atlassian.confluence.core.PersistentDecorator@4b592a3b
at java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133)
And when I try to access /admin/editdecorator.action?decoratorName=decorators/main.vmd I get this System Error:
Cause
java.util.concurrent.CompletionException: java.lang.IllegalStateException: Duplicate key com.atlassian.confluence.core.PersistentDecorator@4b592a3b
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273)
caused by: java.lang.IllegalStateException: Duplicate key com.atlassian.confluence.core.PersistentDecorator@4b592a3b
at java.util.stream.Collectors.lambda$throwingMerger$0(Collectors.java:133)
I have found the main.vmd file on the server but it doesn't reflect any changes made via the web interface.
Any ideas how can I fix or revert main.vmd back?
Thanks in advance.