Expand my Community achievements bar.

SOLVED

Failed to create comment...posted a comment with suspicious userIdentifier

Avatar

Not applicable

How do I configure the logic/rules for posting comments? Currently, we are using a custom authentication system but when a user attempts to create a comment, a CommentException is thrown saying the user has a suspicious identifier.

Also, I couldn't seem to find any straightforward documentation on how comments are "processed" and replicated from Author to Publish (and vise-versa) instance. Could you point me to some documentation or resource on how the lifecycle of comments work within AEM?

1 Accepted Solution

Avatar

Correct answer by
Not applicable

I was able to resolve this issue base on the answer here: http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage.... It appears that I need to be using the admin Social Communities functionality to delete comments. This is a bit confusing though since the author instance allows deleting comments for individual blog posts, however, those changes don't propagate to the publish instances.

5 Replies

Avatar

Level 9

Let's start with the CQ/AEM version you are using.  If it is CQ 5.6.1, the next question is whether you upgraded to cq-socialcommunities-pkg-1.4 or not.

- JK

Avatar

Not applicable

We are currently using cq-socialcommunities-pkg-1.3.12.

Avatar

Level 9

v1.3 shipped in CQ 5.6.1.

You could be using either /libs/collab/commons/components/comments (deprecated in 5.6.1) or /libs/social/commons/components/comments

A stack trace, if not a log of signing in and posting a comment, would also be of help.  Could it be that the Comments code caught an exception from your custom authentication code and rethrew it?

If you look at /libs/social/commons/components/comments/comments.jsp, it appears the exception would happen somewhere around here :

<%
    if (!cs.isClosed() && CollabUtil.canAddNode(resourceResolver.adaptTo(Session.class), cs.getRootPath())) {
    %><sling:include resourceType="social/commons/components/composer" replaceSelectors="simple-template"/><%
    }
    if(!CollabUtil.canAddNode(resourceResolver.adaptTo(Session.class), cs.getRootPath())) {
        %><p><%=i18n.get("You are not allowed to post here, please sign in or join")%></p>

 

The answer to replication of "comments" (UGC)  is complicated.  It depends on your deployment, but prior to AEM Communities 6.1, UGC is first reverse replicated to the author instance and then forward replicated to any other publish instances.  It can be tricky to keep all UGC appropriately synchronized.

As of AEM 6.1 (v1.7), there is a common store for UGC that is visible to all author and publish instances.  Replication is no longer used for UGC.

 

If there are any plans to move forward to a more recent release, then consideration should be given to at least upgrading now to the v1.4 socialcommunities package that's built for CQ 5.6.1.

- JK

Avatar

Level 9

Hi Vincent,

Did this get resolved?

I meant to provide a link to the v1.4 package :

http://docs.adobe.com/docs/en/aem/6-0/develop/social-communities.html#Social%20Communities%20Version%201.4

- JK

Avatar

Correct answer by
Not applicable

I was able to resolve this issue base on the answer here: http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage.... It appears that I need to be using the admin Social Communities functionality to delete comments. This is a bit confusing though since the author instance allows deleting comments for individual blog posts, however, those changes don't propagate to the publish instances.

page footer The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 81, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 81, column 5] ----