Details
-
Bug
-
Resolution: Fixed
-
Medium
-
5.3
-
None
Description
Steps to Reproduce:
- Create a space and select an Integer for the space key
- Create a How-to article for the space.
- Navigate to the space, and go to How-To articles page.
- Try to create a How to article using the Add How-To Article button.
Actual Results:
The How-To article will not get created.
Error in the logs:
ERROR [http-8090-6] [jersey.spi.container.ContainerResponse] logException Mapped exception to response: 500 (Internal Server Error) -- url: /rest/create-dialog/1.0/content-blueprint/create-draft | userName: admin | referer: http://localhost:8090/display/1/How-To+Articles?src=spaceshortcut com.atlassian.confluence.plugins.createcontent.exceptions.ResourceException: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at com.atlassian.confluence.plugins.createcontent.rest.ContentBlueprintResource.createDraft(ContentBlueprintResource.java:90) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ... Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String at com.atlassian.confluence.plugins.createcontent.api.contextproviders.BlueprintContext.getSpaceKey(BlueprintContext.java:60) at com.atlassian.confluence.plugins.confluence_kb_space_blueprint.ContentTemplateContextProvider.updateBlueprintContext(ContentTemplateContextProvider.java:46) at com.atlassian.confluence.plugins.createcontent.api.contextproviders.AbstractBlueprintContextProvider.getContextMap(AbstractBlueprintContextProvider.java:26)
Findings:
- It is possible to create How-To article from the top bar Create > How-To Article.
- This behavior will not be the same if the space key is not an Integer. Articles will be created successfully.