User activity notifications not send

cancel
Showing results for 
Search instead for 
Did you mean: 
adalgix
Member II

User activity notifications not send

Hello Everybody!

We have a fresh Alfresco community 5.2.0 that was working perfectly. Some day ago users started import documents loading through CIF (ctrl-c and ctrl-v of directories from intranet to Z:\Alfresco\Sites\some-site\documentLibrary\).:

Now daily users activity notification via mail doesn't work. If I look in Alfresco.log can see these errors occurring at 00:00, when activity notification emails should start:

2018-03-01 00:00:01,418 ERROR [freemarker.runtime] [FeedNotifier1] Error executing FreeMarker template
FreeMarker template error:
The following has evaluated to null or missing:
==> {activity.activitySummary.pag [in template "workspace://SpacesStore/36557e09-2e9f-4a78-aa17-48a1b69ec0e1" at line 53, column 130]

Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??

The failing instruction (FTL stack trace):
----------
==> ${activity.activitySummary.page?html!""} [in template "workspace://SpacesStore/36557e09-2e9f-4a78-aa17-48a1b69ec0e1" at line 53, column 128]
#assign itemLink = "\la href=\"\${sha... [in template "workspace://SpacesStore/36557e09-2e9f-4a78-aa17-48a1b69ec0e1" at line 53, column 49]
----------

Java stack trace (for programmers):
----------
freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
at freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:98)....

I googled for some solutions but found only on user with the same issue and his issue was resolved "magically" by itself!.

Thank you in advance for any help!

1 Reply
ebrenes
Active Member

Re: User activity notifications not send

Hello,

 

I had the same issue. There is a bug in the ftl template, to fix that just go to alfresco share "Repository/Data Dictionary/Email Templates/activities" and edit the file activities-email.ftl. Go to the line you are getting the error ${activity.activitySummary.page?html!\"\"} and change it to ${(activity.activitySummary.page?html)!\"\"}

As you can see I just added parenthesis to cover the entire expression. 

Don't forget to restart the server.