Details
-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
5.9.1-OD-2015.40.1-0001, 5.9.4, 6.0.0-OD-2016.12.4
-
22
-
Severity 3 - Minor
-
0
-
Description
NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.
Summary
If a user imports a space where the Spacename is exactly the same as the SpaceKey (eg: WOW / WOW) then once the import is complete a Template error is shown on all pages in Confluence
Steps to Reproduce
- Create a Space with the following name and key: name: WOW key: WOW
- Make sure they are both in full capital letters
- Create a full Space Export
- Import this Space into a different instance
Expected Results
Once the import is complete the user should be taken to the Space
Actual Results
Each Confluence page now shows the following error:
Error occurred during template rendering: Invocation of method 'getRenderedParam' in class com.atlassian.plugin.web.model.DefaultWebParam threw exception java.lang.NullPointerException at template/includes/menu-macros.vm[line 67, column 50]. Contact your administrator for assistance.
The below exception is thrown in the Confluence log file:
@4000000056164e301e5c4144 org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getRenderedParam' in class com.atlassian.plugin.web.model.DefaultWebParam threw exception java.lang.NullPointerException at template/includes/menu-macros.vm[line 67, column 50] @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) @4000000056164e301e5c9b1c at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:284) @4000000056164e301e5ca2ec at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:507) @4000000056164e301e5ca6d4 at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) @4000000056164e301e5cb674 at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) @4000000056164e301e5cba5c at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.performIteration(Foreach.java:393) @4000000056164e301e5cc22c at org.apache.velocity.runtime.directive.Foreach.render(Foreach.java:316) @4000000056164e301e5cc614 at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175) ... @4000000056164e301e608aec Caused by: java.lang.NullPointerException @4000000056164e301e608aec at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:120) @4000000056164e301e6092bc at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService$1.compare(DefaultSpaceCollectionService.java:116) @4000000056164e301e6096a4 at java.util.TimSort.countRunAndMakeAscending(TimSort.java:351) @4000000056164e301e6096a4 at java.util.TimSort.sort(TimSort.java:216) @4000000056164e301e6096a4 at java.util.Arrays.sort(Arrays.java:1512) @4000000056164e301e609e74 at java.util.ArrayList.sort(ArrayList.java:1454) @4000000056164e301e609e74 at java.util.Collections.sort(Collections.java:175) @4000000056164e301e60a25c at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService.getOtherSpaces(DefaultSpaceCollectionService.java:115) @4000000056164e301e60a25c at com.atlassian.confluence.plugins.createcontent.impl.DefaultSpaceCollectionService.getSpaces(DefaultSpaceCollectionService.java:69) @4000000056164e301e60aa2c at com.atlassian.confluence.plugins.createcontent.contextproviders.QuickCreateUrlContextProvider.getContextMap(QuickCreateUrlContextProvider.java:65) @4000000056164e301e60c96c at com.atlassian.plugin.web.model.AbstractWebItem.getContextMap(AbstractWebItem.java:30) @4000000056164e301e60c96c at com.atlassian.plugin.web.model.DefaultWebParam.getRenderedParam(DefaultWebParam.java:48)
Workaround
To set a name to the space that is now showing as "undefined"
Workaround 1:
- Go to Space > Space Directory: <confluence-site>/spacedirectory/view.action
- Look for spaces with the name set as 'undefined';
- Click the space name to go to the space
- Select: Space Tools -> Overview
- Edit Space Details to set a Name
Workaround 2: If it's not possible to navigate to set a space name.
- Run the following command against the database
select * from spaces where spacename is NULL;
- Stop Confluence
- Backup Confluence database
- In the database, run:
update spaces set spacename='SPACE_NAME' where spaceid=XXXXXX;
Where XXXXXX is the spaceid from the results returned in your Diagnosis, and the SPACE_NAME is set to the desired space name.
- Start Confluence
- Re-index Confluence
Attachments
Issue Links
- is related to
-
CONFSERVER-39999 Lazy lucene lock aquisition causing corruption in Lucene Term Dictionary (*_Lucene41_0.tim). Error is '..LuceneException: java.io.IOException: null: NIOFSIndexInput..' which displays instead of the dashboard.
- Closed
- relates to
-
CONFCLOUD-39517 Space Imports with SpaceName the same as SpaceKey cause Template NullPointerException
- Closed