-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
None
-
Affects Version/s: 7.4.1
-
Component/s: Apps - Confluence Questions
-
3
-
Severity 3 - Minor
-
0
Summary
Creating a Confluence Questions topic with special characters fails with:
- An unknown server error has occurred.
Environment
- Confluence 7.4.0
- Questions for Confluence 2.7.20
Steps to Reproduce
- Install Questions for Confluence from Marketplace
- Go to the Topics tab
Enter a new topic with Special Characters in it- For example: test.topic
- Click Next and Save
Expected Results
A new topic is created
Actual Results
- An error occurs:
An unknown server error has occurred.
An error in atlassian-confluence.log occurs:
java.lang.IllegalArgumentException: Invalid label 'test.topic'
at com.atlassian.confluence.labels.DefaultLabelManager.validateLabel(DefaultLabelManager.java:672)
at com.atlassian.confluence.labels.DefaultLabelManager.createLabel(DefaultLabelManager.java:645)
at com.atlassian.confluence.labels.CachingLabelManager.createLabel(CachingLabelManager.java:386)
...
at com.atlassian.confluence.plugins.questions.contenttype.repository.QuestionsLabelManager.createLabel(QuestionsLabelManager.java:24)
at com.atlassian.confluence.plugins.questions.contenttype.repository.LabelTopicRepository.create(LabelTopicRepository.java:132)
at com.atlassian.confluence.plugins.questions.contenttype.repository.LabelTopicRepository.create(LabelTopicRepository.java:126)
at com.atlassian.confluence.plugins.questions.service.TopicServiceImpl.createTopic(TopicServiceImpl.java:132)
...
Root Cause
A Topic follows the validation for a label in which these characters are not permitted:
LabelParser.java
private static final SortedSet<Character> INVALID_LABEL_CHARACTERS = ImmutableSortedSet.of(
':', ';', ',', '.', ' ', '?', '&', '[', ']', '(', ')', '#', '^', '*', '@', '!', '<', '>'
);
The label validation error is shown when creating a "Label":
It appears the above informative exception when creating a label is not propagated to Confluence Questions add-on when creating a Topic.
Resolution
Change the Topic name so it does not contain one of the above mentioned special characters.
- is related to
-
CONFSERVER-54891 Questions for Confluence throws error add Topic with Special Characters when creating a new question
-
- Long Term Backlog
-