Forum Discussion
Henrik
Advisor
Hi,
I got the same issue. It seems to me that Lithium catch the error before Freemarker does.
I want to test if one node of the REST result exists:
<#assign user_ranking = rest("/users/id/${user.id}/ranking").ranking /> <#attempt> <#assign user_ranking_image_left = author_ranking.display.left_image.url?replace("http://www.cvous.com", "")?js_string /> <#recover> <#assign user_ranking_image_left = "" /> </#attempt> <#attempt> <#assign user_ranking_image_right = author_ranking.display.right_image.url?replace("http://www.cvous.com", "")?js_string /> <#recover> <#assign user_ranking_image_right = "" /> </#attempt>
But the "attempt" test will generate a "This widget could not be displayed" for anonymous or non admin members.
I don't even know why it works for admin member.
Have a nice day!
Henrik
nathan
12 years agoExecutive
You might want to check that normal and anonymous users have permission to access the REST API call (as this is outside of the attempt/recover block).
Related Content
- 5 months ago
- 2 years ago
- 2 years ago