<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic [DELETE THIS THREAD] Activities suddenly stopped working in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/delete-this-thread-activities-suddenly-stopped-working/m-p/125775#M34283</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have an Alfresco instance that was up and running a couple of months and then, suddenly new&lt;STRONG&gt;&amp;nbsp;activities stopped showing up&lt;/STRONG&gt; both in Share dashlets and with REST API.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see new activities in the&amp;nbsp;&lt;SPAN&gt;alf_activity_post table but not in the&amp;nbsp;&lt;STRONG&gt;alf_activity_feed &lt;/STRONG&gt;table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the logs, I did not find anything useful (what loggers can I check?).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do you have any idea what can cause the issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;After setting the&amp;nbsp;&lt;EM&gt;insert_activity_feed&lt;/EM&gt; logger to DEBUG I can only see lots of "Preparing" logs&lt;/P&gt;&lt;PRE&gt;2020-12-20 14:56:18,622 DEBUG [alfresco.activities.insert.insert_activity_feed] [LocalFeedGenerator2] &amp;lt;==    Updates: 1
2020-12-20 14:56:18,624 DEBUG [alfresco.activities.insert.insert_activity_feed] [LocalFeedGenerator2] ==&amp;gt;  Preparing: insert into alf_activity_feed (id, activity_type, activity_summary, feed_user_id, post_user_id, post_date, post_id, site_network, app_tool, feed_date) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 
2020-12-20 14:56:18,624 DEBUG [alfresco.activities.insert.insert_activity_feed] [LocalFeedGenerator2] ==&amp;gt; Parameters: 1013936685(Long), org.alfresco.documentlibrary.file-previewed(String), {"firstName":"John","lastName":"Smith","parentNodeRef":"workspace://SpacesStore/af0dha0a-cf60-5997-8129-17364e154a83","nodeRef":"workspace://SpacesStore/2ee995dj-1af4-4a96-9fja-02eeda9384a9","page":"document-details?nodeRef=workspace://SpacesStore/2ee995dj-1af4-4a96-9fja-02eeda9384a9","title":"x1kw(sample_name)_2020.12.02.pdf"}(String), r.johnson(String), l.smith(String), 2020-12-09 08:15:47.983(Timestamp), 5541(Long), sample-site-test(String), documentlibrary(String), 2020-12-20 14:56:18.624(Timestamp)&lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;EDIT. Thread has been solved in&amp;nbsp;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/feednotifier-does-not-send-emails/m-p/303540#M22299" target="_self" rel="nofollow noopener noreferrer"&gt;this&lt;/A&gt; post.&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 20 Dec 2020 10:29:36 GMT</pubDate>
    <dc:creator>upforsin</dc:creator>
    <dc:date>2020-12-20T10:29:36Z</dc:date>
    <item>
      <title>[DELETE THIS THREAD] Activities suddenly stopped working</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/delete-this-thread-activities-suddenly-stopped-working/m-p/125775#M34283</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I have an Alfresco instance that was up and running a couple of months and then, suddenly new&lt;STRONG&gt;&amp;nbsp;activities stopped showing up&lt;/STRONG&gt; both in Share dashlets and with REST API.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see new activities in the&amp;nbsp;&lt;SPAN&gt;alf_activity_post table but not in the&amp;nbsp;&lt;STRONG&gt;alf_activity_feed &lt;/STRONG&gt;table.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the logs, I did not find anything useful (what loggers can I check?).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Do you have any idea what can cause the issue?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;After setting the&amp;nbsp;&lt;EM&gt;insert_activity_feed&lt;/EM&gt; logger to DEBUG I can only see lots of "Preparing" logs&lt;/P&gt;&lt;PRE&gt;2020-12-20 14:56:18,622 DEBUG [alfresco.activities.insert.insert_activity_feed] [LocalFeedGenerator2] &amp;lt;==    Updates: 1
2020-12-20 14:56:18,624 DEBUG [alfresco.activities.insert.insert_activity_feed] [LocalFeedGenerator2] ==&amp;gt;  Preparing: insert into alf_activity_feed (id, activity_type, activity_summary, feed_user_id, post_user_id, post_date, post_id, site_network, app_tool, feed_date) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) 
2020-12-20 14:56:18,624 DEBUG [alfresco.activities.insert.insert_activity_feed] [LocalFeedGenerator2] ==&amp;gt; Parameters: 1013936685(Long), org.alfresco.documentlibrary.file-previewed(String), {"firstName":"John","lastName":"Smith","parentNodeRef":"workspace://SpacesStore/af0dha0a-cf60-5997-8129-17364e154a83","nodeRef":"workspace://SpacesStore/2ee995dj-1af4-4a96-9fja-02eeda9384a9","page":"document-details?nodeRef=workspace://SpacesStore/2ee995dj-1af4-4a96-9fja-02eeda9384a9","title":"x1kw(sample_name)_2020.12.02.pdf"}(String), r.johnson(String), l.smith(String), 2020-12-09 08:15:47.983(Timestamp), 5541(Long), sample-site-test(String), documentlibrary(String), 2020-12-20 14:56:18.624(Timestamp)&lt;/PRE&gt;&lt;P&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;EDIT. Thread has been solved in&amp;nbsp;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/feednotifier-does-not-send-emails/m-p/303540#M22299" target="_self" rel="nofollow noopener noreferrer"&gt;this&lt;/A&gt; post.&amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Dec 2020 10:29:36 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/delete-this-thread-activities-suddenly-stopped-working/m-p/125775#M34283</guid>
      <dc:creator>upforsin</dc:creator>
      <dc:date>2020-12-20T10:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: Activities suddenly stopped working</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/delete-this-thread-activities-suddenly-stopped-working/m-p/125776#M34284</link>
      <description>&lt;P&gt;Alright, sorry guys, it seems like my mistake. I added a few lines to LocalFeedTaskProcessor.java to add parentNodeName to the activityPost. It was working for a while but then it was causing an issue (but why?). After commenting out this code it's working again.&lt;/P&gt;&lt;P&gt;I added this code to the selectPost method:&lt;/P&gt;&lt;PRE&gt;for(ActivityPostEntity activityPost : activityPosts) {&lt;BR /&gt;    try {
     	JSONObject activiyDataJson = new JSONObject(activityPost.getActivityData());
        String parentNodeName = (String) nodeService.getProperty(new NodeRef(activiyDataJson.get("parentNodeRef").toString()), ContentModel.PROP_TITLE);
	if(parentNodeName == null || parentNodeName.length() == 0) {
	    parentNodeName = (String) nodeService.getProperty(new NodeRef(activiyDataJson.get("parentNodeRef").toString()), ContentModel.PROP_NAME);
	}
	activiyDataJson.put("parentTitle", parentNodeName);
	activityPost.setActivityData(activiyDataJson.toString());
    } catch (JSONException e) {
	logger.debug("[LocalFeedTaskProcessor]: could not load JSON while getting parent node!\n");
    } catch (Exception e ) {&lt;BR /&gt;        logger.debug("[LocalFeedTaskProcessor]: could not get parent node!\n");
    }&lt;BR /&gt;}&lt;/PRE&gt;&lt;P&gt;(I know it is very inefficient and it should be done in PostLookup but I didn't want to interfere in code too much as I would have to reimplement almost every class connected to the activities)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;PS&lt;/STRONG&gt;. Merry Christmas!&amp;nbsp;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Dec 2020 10:45:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/delete-this-thread-activities-suddenly-stopped-working/m-p/125776#M34284</guid>
      <dc:creator>upforsin</dc:creator>
      <dc:date>2020-12-21T10:45:18Z</dc:date>
    </item>
  </channel>
</rss>

