-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Affects Version/s: 1.4.1
-
Component/s: None
There is bug in space.vmd decorator fragment:
—
#if ($blog.comments.size() > 0)
<a href="$req.contextPath$generalUtil.getPageUrl($blog)?showComments=true#comments">$blog.comments.size() comment#if($blog.comments.size() > 1)s#end</a>
#else
<a href="$req.contextPath$generalUtil.getPageUrl($blog)?showComments=true#comments">0 comments</a>
#end
—
If blog title contains national (non-ascii) character then $generalUtil.getPageUrl($blog) returns something like /pages/viewpage.action?pageId=xxx
As a result the final URL is
/pages/viewpage.action?pageId=xxx?showComments=true#comments
which gives server exception when clicked (as it contains two ? in URL, in this case second ? should be replaced with &)
The following workaround was made to avoid this issue:
—
#if ($generalUtil.getPageUrl($blog).indexOf("?") < 0)
#set( $sep = "?" )
#else
#set( $sep = "&" )
#end
#if ($blog.comments.size() > 0)
<a href="$req.contextPath$generalUtil.getPageUrl($blog)${sep}showComments=true#comments">$blog.comments.size() comment#if($blog.comments.size() > 1)s#end</a>
#else
<a href="$req.contextPath$generalUtil.getPageUrl($blog)${sep}showComments=true#comments">0 comments</a>
#end
—
- is duplicated by
-
CONFSERVER-3440 Comments-link for news is malformed
-
- Closed
-