mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
FIXED : ALF-11683: Failure occurs when Site Contributor tries to add first comment to the post
fm:commentsRollup now being added by the service instead of the webscript git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32337 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -21,12 +21,6 @@ function addComment(node)
|
|||||||
// get a unique name
|
// get a unique name
|
||||||
var name = getUniqueChildName(commentsFolder, "comment");
|
var name = getUniqueChildName(commentsFolder, "comment");
|
||||||
|
|
||||||
// Add the comments rollup aspect to the commented-upon node.
|
|
||||||
if (!node.hasAspect("fm:commentsRollup"))
|
|
||||||
{
|
|
||||||
node.addAspect("fm:commentsRollup");
|
|
||||||
}
|
|
||||||
|
|
||||||
// create the comment
|
// create the comment
|
||||||
var commentNode = commentsFolder.createNode(name, "fm:post");
|
var commentNode = commentsFolder.createNode(name, "fm:post");
|
||||||
commentNode.mimetype = "text/html";
|
commentNode.mimetype = "text/html";
|
||||||
|
@@ -80,6 +80,7 @@ public class ScriptCommentService extends BaseScopableProcessorExtension
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
nodeService.addAspect(nodeRef, QName.createQName(NamespaceService.FORUMS_MODEL_1_0_URI, "discussable"), null);
|
nodeService.addAspect(nodeRef, QName.createQName(NamespaceService.FORUMS_MODEL_1_0_URI, "discussable"), null);
|
||||||
|
nodeService.addAspect(nodeRef, QName.createQName(NamespaceService.FORUMS_MODEL_1_0_URI, "commentsRollup"), null);
|
||||||
List<ChildAssociationRef> assocs = nodeService.getChildAssocs(nodeRef, QName.createQName(NamespaceService.FORUMS_MODEL_1_0_URI, "discussion"), RegexQNamePattern.MATCH_ALL);
|
List<ChildAssociationRef> assocs = nodeService.getChildAssocs(nodeRef, QName.createQName(NamespaceService.FORUMS_MODEL_1_0_URI, "discussion"), RegexQNamePattern.MATCH_ALL);
|
||||||
if (assocs.size() != 0)
|
if (assocs.size() != 0)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user