Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM 6.2 SP1 Communities - Communities Activity List component shows No activity.

Avatar

Avatar
Validate 1
Level 1
AlexSel
Level 1

Likes

0 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
AlexSel
Level 1

Likes

0 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
AlexSel
Level 1

09-03-2017

Description of setup and problem

AEM Version: AEM 6.2 SP1

UGC storage – JSRP.

Topology: single Author, single Publish.

“cq-social-reporting-management” bundle version: 1.0.77

Description of component and content

Component path:

/libs/social/reporting/analytics/components/hbs/communityactivitylist

Content path:

/content/CUSTOMER-communities/CUSTOMER-communities-site/en/jcr:content/content/primary/com munityactivitylis

[jcr:primaryType = nt:unstructured, sling:resourceType = social/reporting/analytics/components/hbs/communityactivitylist]

Component class: com.adobe.cq.social.reporting.analytics.impl.AnalyticsCommunityActivityCollectionImpl

Configuration:

  1. Type: Content
  2. Display title: View Recent Community Activity and Join In
  3. Display count: 10
  4. Activity type: Views
  5. Time period: Last 30 days
  6. Context Path: /content/CUSTOMER-communities/CUSTOMER-communities-site
  7. Member count aggregation: false

Problem

Problem: No matter how long to wait for analytics to import there is no data shown by the communityactivitylist component:

Proof of correct integration setup

In the same time “/communities/reports/views” shows Analytics reports both on author and publish without issues:

It shows data imported into “/var/statistics/sitecatalyst” which confirms that integration with Adobe Analytics configured correctly.

Additional custom eVar / event variables are being sent to Adobe Analytics as well (monitored using Adobe Marketing Cloud Debugger😞

                                         

events

event2

eVar2

CUSTOMER Communities Site

eVar3

Forum

eVar4

Developers

eVar5

/content/CUSTOMER-communities/CUSTOMER-communities-site/en/communities/developers

eVar6

social/forum/components/hbs/topic

eVar7

My test post

eVar8

admin

eVar9

/content/usergenerated/asi/jcr/content/CUSTOMER-communities/CUSTOMER-communities-site/en/c ommunities/developers/forum/jcr:content/content/primary/forum/hfu1-my_test_postdescrip

eVar10

/content/CUSTOMER-communities/CUSTOMER-communities-site/en

 

These eVars / events are added to appropriate report suite and mapping in /etc/cloudservices Adobe Analytics config is present.

Investigation

After decompiling “AnalyticsCommunityActivityCollectionImpl” class and enabling debug log for “org.apache.jackrabbit.oak.query.QueryImpl” class, the following query discovered:

Query: SELECT * FROM [social:asiResource] AS c WHERE ISDESCENDANTNODE(c, '/content/usergenerated/asi/jcr/content/CUSTOMER-communities/CUSTOMER-communities-site') AND (NOT (c.[views_last30Days_tl] IS null)) ORDER BY [views_last30Days_tl] DESC, path=/content/usergenerated/asi/jcr/content/CUSTOMER-communities/CUSTOMER-communities-sit e//*)

So, it tries to find “views_last30Days_tl” (for our case of configuration) within UGC in social:asiResource nodes.

Nodes cannot be found cause “views_last30Days_tl” is absent in all cases.

22 results if the condition with “views_last30Days_tl” is absent.

Other related components configuration

AEM Communities Analytics Component Configuration:

(social/reporting/analytics/components/hbs/communityactivitylist added)

 

Primary publisher checkbox is set to true on Publish node.

 

Tunnel service enabled on Author with replication agent configured and tested.

Code decompiled issues found

Once decompiled the code in “cq-social-reporting-management-1.0.77.jar”, I see several problems in there which might be the root cause of this issue (inconsistencies showing that the code requires update):

  1. Service users used in com.adobe.cq.social.reporting.analytics.impl.AnalyticsReportImporter (analytics-import-writer, user-admin, analytics-admin) don’t exist in AEM 6.2 SP1 OOTB under /home/users/system/… . This class seems to be responsible for creation of absent “views_last30Days_tl” under UGC.

 

  1. It is not possible to run com.adobe.cq.social.reporting.analytics.impl.AnalyticsReportImporterRequestServlet with {path}.requestAnalyticsImport.json request cause of the check:

if (("cq:PollConfigFolder".equals(nodeType)) && (validResourceTypes.contains(resourceType))) {

 

This check means that same node in repository should in the same time of cq:PollConfigFolder type and should have resourceType property with one of social components resource types as value. Could you please point me to example of such structure in repository if I’m wrong?

 

This servlet fails to run on publish cause of this check and it is always in unsatisfied state on author and thus it is not possible to run import in force mode without waiting for configured interval of time.

 

  1. If we configure the com.adobe.cq.social.reporting.analytics.services.impl.AnalyticsReportImporterServiceImpl we got the following error in logs (no matter how we configure it, either using XML file or using OSGi console):

28.02.2017 17:03:39.014 *ERROR* [SCR Component Actor] com.adobe.cq.social.cq-social-reporting-management [com.adobe.cq.social.reporting.analytics.services.impl.AnalyticsReportImporterServiceImpl (2745)] The activate method has thrown an exception (java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long)

java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long

The component becomes unsatisfied and this doesn’t allow to change the import interval without decompile / code change / recompile procedure of the OOTB bundle.

This issues is fixable by deleting configuration and using default values (12h import interval). Anyway “views_last30Days_tl” doesn’t appear under UGC storage and concrete component node.

Questions

  1. Do you have any hotfixes for issues described above?
  2. Which service is responsible for creation of “cq:PollConfigFolder” node? Does this service put resource type (communityactivitylist) in this node? Where in the documentation I can find description of such structures and how they should look like for the importer to work properly? I mean the case of communityactivitylist component, because other poll configurations are there and they seems to be fine, but they are generic and used for general site reports:

 

 

  1. Shall I create system users described in the issue #1 above? Which rights should they have? Do you have a package with them? Does their absence mean inconsistent state after SP1/AEM 6.2 GA installation?
  2. How to make work the servlet that forces the import (AnalyticsReportImporterRequestServlet)? Which path to request? Please describe the type of content that this servlet works with considering the strange check in the code.
View Entire Topic

Avatar

Avatar
Validate 1
Level 1
AlexSel
Level 1

Likes

0 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
AlexSel
Level 1

Likes

0 likes

Total Posts

11 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
AlexSel
Level 1

10-03-2017

Hi,

Installing FP2 solved the problem. Now I can see some of statistics as for views/posts in the component. For example, "views_last30Days_tl" appeared in my forum posts.

BTW, "cq-social-reporting-management" bundle version updated from 1.0.77 to 1.1.17.

And yes, thank you, good catch, "AEM Communities Analytics Component Configuration" configuration doesn't require communityactivitylist in there.

For me it was hard to understand from the documentation whether Communities Feature Packs are included in Service Packs or not, and finally I forgot about this question assuming it is. Good catch from your side that you've started from the very beginning.

Also, it took time to re-enable analytics after FP2 installation (delete analytics nodes under site jcr:content node, disable/enable it for site, otherwise it denied to update the structure).

Shall I write in the same thread here if I would have additional problems with testing this functionality futher (this "Communities Activity List" component) or shall I create a new thread for new problem?

Thank you for your help!