Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

AEM Communities Forum Post and Activity Stream

Avatar

Community Advisor

Hello,

I am using  a custom implementation of forums where "social/forum/components/hbs/forum" is extended. When making a forum post I see that the related 'activity' entry

is created with id  as "id": "/content/usergenerated/asi/mongo/content/project/en/root/activitystreams/activities/community/b8554901-55af-4cd8-a698-a944aa1c7fac"

However when I test the same in we retail or geometrixx I see that the related "activity" entry looks like "id": "/content/usergenerated/asi/mongo/content/sites/activitystreams/activities/community/c9a103b5-8491-40a6-84f7-c4bd9187541d"

How can this be controlled? Why does the activity entry for custom implementation pick the stream path as "/content/project/en/root" instead of "/content/sites"?

I have tried extending com.adobe.cq.social.forum.client.endpoints.ForumOperationExtension to see if I can set something in the beforeAction(Operation operation, Session session, Resource resource, Map<String, Object> properties) method, but doesn't look like.

Please update if something is missed or any other way to achieve this.

The reason I am looking in specified way is because I am looking to have these activities in activity stream and the activities are only displayed if the id is as mentioned above with "/content/sites/"

Regards,

Shubham

Using AEM 6.2 FP3 SP1

1 Accepted Solution

Avatar

Correct answer by
Employee

Shubam - It's determined by the site root you give while creating the site.

Look for Community Site Root in [0].

[0] - Author a New Community Site

View solution in original post

5 Replies

Avatar

Community Advisor

Update:

For following sentence in my actual question:

It is true for geometrixx-outdoors at location http://localhost:6503/content/geometrixx-outdoors/en/community/hiking/forum.html .

For We-retail the activity entry looks like following

"/content/usergenerated/asi/mongo/content/we-retail/activitystreams/activities/community/404fc48e-69f2-40f0-8571-66d32a02f7ca"

It seems some factor is determining the "/content/we-retail" (community site based) or "/content/sites" (general root based) in the activity stream location/provider_id.

Please help if any one has an idea.

Regards,

Shubham

Avatar

Administrator

Checking this with the team!!



Kautuk Sahni

Avatar

Correct answer by
Employee

Shubam - It's determined by the site root you give while creating the site.

Look for Community Site Root in [0].

[0] - Author a New Community Site

Avatar

Community Advisor

Thanks Rahul. I noticed a property isCommunitySite at the jcr:content node of the root I selected probably added while community site creation but not because of what.

I have created a community site under /content/project/en/category/ and the root while creating community being the same, hence the activity entries under the community contain /content/project/en/category/ in id. Open question: Is it a best practice to keep the root as /content/project/en/category/ in this case or leaving blank is also fine?

Avatar

Employee

Leaving it blank is as acceptable and efficient as putting any valid path!