Favorites webscript not working

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-07-2016 07:29 AM
Hey everybody,
when programming against Alfresco I encountered a problem with the favorites function.
I'm using the following webscript:
http://localhost:8080/alfresco/service/slingshot/doclib/doclist/all/node/alfresco/company/home?filte...
Locally, it return all folders and documents that I marked as favorites. I'm using this information to display the favorites in another page.
Unfortunately, the web script is not working on a server. There are no errors or exceptions, but the script simply returns that there are no favorites (emtpy result set). Also the alfresco.log does not show any errors.
I also found out, that the MyFavorites dashlet of the native Alfresco version is not working for the server as it also does not show any favorited documents.
Locally, this again is working perfectly fine (http://localhost:8081/share/page/context/mine/myfiles#filter=favourites&page=1).
Thanks a lot in advance.
Kind regards
KingKong
when programming against Alfresco I encountered a problem with the favorites function.
I'm using the following webscript:
http://localhost:8080/alfresco/service/slingshot/doclib/doclist/all/node/alfresco/company/home?filte...
Locally, it return all folders and documents that I marked as favorites. I'm using this information to display the favorites in another page.
Unfortunately, the web script is not working on a server. There are no errors or exceptions, but the script simply returns that there are no favorites (emtpy result set). Also the alfresco.log does not show any errors.
I also found out, that the MyFavorites dashlet of the native Alfresco version is not working for the server as it also does not show any favorited documents.
Locally, this again is working perfectly fine (http://localhost:8081/share/page/context/mine/myfiles#filter=favourites&page=1).
Thanks a lot in advance.
Kind regards
KingKong
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2016 01:34 AM
Not sure why something working on locally is not working on server.
What I can see is to get list of favorite documents you are using doclist webscript with parameter. This is the way to get favorite document but not the ideal way. To get list of favorite documents Alfresco providing <a href="http://docs.alfresco.com/5.0/pra/1/concepts/pra-favorites-get-favorites.html">REST API </a>. By using it you can get list of favorite document for particular user.
This will provide list of favorite document for user mentioned in URL in JSON format. You can always parse that JSON and display in your page.
Please let me know if this solve your problem.
What I can see is to get list of favorite documents you are using doclist webscript with parameter. This is the way to get favorite document but not the ideal way. To get list of favorite documents Alfresco providing <a href="http://docs.alfresco.com/5.0/pra/1/concepts/pra-favorites-get-favorites.html">REST API </a>. By using it you can get list of favorite document for particular user.
http://localhost:8080/alfresco/api/-default-/public/alfresco/versions/1/people/gawadesk/favorites
This will provide list of favorite document for user mentioned in URL in JSON format. You can always parse that JSON and display in your page.
Please let me know if this solve your problem.
