Details
-
Bug
-
Resolution: Fixed
-
High
-
release-1.1.43
-
Confluence ver 5.4.3
-
Severity 3 - Minor
-
Description
NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.
When we click a Japanese question or a topic, it becomes Page Not Found.
topic
question
The problem is a slash in the last of the URL.
The routing of the URL must be the following rule.
<route to="/cq/questions.action?topicId={topicId}" from="/topics/{topicId: \d+}"/> <route to="/cq/questions.action?topicId={topicId}" from="/topics/{topicId: \d+}/{topicName}"/> ... <route to="/cq/viewquestion.action?id={questionId}" from="/{questionId: \d+}"/> <route to="/cq/viewquestion.action?id={questionId}" from="/{questionId: \d+}/{questionTitle}"/> <route to="/cq/viewquestion.action?id={questionId}" from="/{questionId: \d+}/{questionTitle}/{ignore:.*}"/> ...
It was as follows in ver1.1.0.
54 this.url = buildUrl(); 55 } ... 128 private String buildUrl() 129 { 130 String sanitisedTitle = UrlUtils.sanitiseForUrl(title); 131 return Strings.isNullOrEmpty(sanitisedTitle) 132 ? String.format("/questions/%d", id) 133 : String.format("/questions/%d/%s", id, sanitisedTitle.toLowerCase()); 134 }
In ver1.1.43, the last of the URL gets a slash depending on a result of sanitisedTitle.
public String createViewRoute(Question question) { String sanitisedTitle = UrlUtils.sanitiseForUrl(question.getTitle()); return String.format("%s/%d/%s", new Object[] { getPrefix(question.getSpace()), Long.valueOf(question.getId()), sanitisedTitle.toLowerCase() }); }
public String createViewRoute(Question question) { String sanitisedTitle = UrlUtils.sanitiseForUrl(question.getTitle()); return String.format("%s/%d/%s", new Object[] { getPrefix(question.getSpace()), Long.valueOf(question.getId()), sanitisedTitle.toLowerCase() }); }
This problem occurs in less than Confluence 5.4.x.
This problem does not occur in higher than Confluence 5.5.
Possibly it may be difference in Version of Tomcat.
This problem influences all questions and topics except ASCII.
Workaround
Append any characters behind the URL.
For example:
Original URL: http://www.example.com/confluence/display/QUES/questions/4063265/
Fixed URL 1: http://www.example.com/confluence/display/QUES/questions/4063265/-
Fixed URL 2: http://www.example.com/confluence/display/QUES/questions/4063265/~
Fixed URL 3: http://www.example.com/confluence/display/QUES/questions/4063265/abc
Attachments
Issue Links
- causes
-
CONFSERVER-47893 Japanese questions don't work in Space
- Closed
- is duplicated by
-
CONFSERVER-48146 Question Asked in a Space with Japanese/Chinese Language Returns "Page Not Found" Error
- Closed
- relates to
-
CONFCLOUD-48124 Japanese question and topics are Page Not Found
- Closed