-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Affects Version/s: 5.1.0
-
Component/s: Document Library, Share Application
-
Labels:
-
Bug Priority:
-
Story Points:3
This issues is related to Alfresco Share Services.
itemJSON macro is defined in file templates/webscripts/org.alfresco/slingshot/documentlibrary-v2/item.lib.ftl
The part relative to "likes" processing is:
{{<#if item.likes??>"likes":
{
"isLiked": ${item.likes.isLiked?string},
"totalLikes": ${item.likes.totalLikes?c}
}</#if>,}}
When item.likes doesn't exists, the JSON likes section isn't produced in output, but the comma is written.
To correct this use:
{{<#if item.likes??>"likes":
{
"isLiked": ${item.likes.isLiked?string},
"totalLikes": ${item.likes.totalLikes?c}
},</#if>}}