掲示板

Application Display Template not displaying events for guest users in Lifer

thumbnail
7年前 に Andrew Jordan によって更新されました。

Application Display Template not displaying events for guest users in Lifer

Junior Member 投稿: 39 参加年月日: 15/11/02 最新の投稿
I've created an Application Display Template (ADT) in Liferay 6.2. I'm using the Asset Publisher functionality to display calendar events on a webpage. When I'm logged in as an admin I can see the events. However, when I'm logged out as a guest, It doesn't display any of them.

I'm thinking this is not a code issue, but more of a 'permissioning' issue. What am I missing?

1. I've checked the ADT's permissions and have the guest view selected.
2. The calendar portlet is set to guest view.
3. The individual calendars within the calendar portlet are set to have
guest w/ view and view event details
4. The events have the invitation set to 'Guest - [calendar name]' and
it has been accepted

Please use this code and see if you can view events when you are logged out/as a guest.

#set ($calService = $utilLocator.findUtil("calendar-portlet", "com.liferay.calendar.service.CalendarBookingLocalService"))
    
    #if (!$entries.isEmpty())
        #foreach ($entry in $entries)
           #set ($calBookingEntry = $calService.getCalendarBooking($entry.getAssetRenderer().getClassPK()))
            <ul>
             <li>Title: $calBookingEntry.getTitle($locale)</li></ul>
             <li>Start: $dateTool.format($calBookingEntry.getStartTime())
              </li>
  • End: $dateTool.format($calBookingEntry.getEndTime()) #end #end


  • Any information would be greatly appreciated.
    thumbnail
    3年前 に Eduardo P. García によって更新されました。

    RE: Application Display Template not displaying events for guest users in L

    Regular Member 投稿: 157 参加年月日: 12/03/16 最新の投稿
    Hi Andrew,

    Are your calendar events displayed in the Asset Publisher as a guest without using your ADT? I want to determine whether this is an issue with the Asset Publisher or with ADT.

    Thanks
    thumbnail
    7年前 に Andrew Jordan によって更新されました。

    RE: Application Display Template not displaying events for guest users in L

    Junior Member 投稿: 39 参加年月日: 15/11/02 最新の投稿
    Hello Eduardo,

    Thank you for your assistance.

    No, the asset publisher does not display any events as guest, even without the ADT. I'm thinking it is a permission issue, as I have tested in my local instance of Liferay, preprod instance, and a different prod instance of Liferay. I think it is specific to this Liferay instance. My ADT code displays the events to guest users in those other instances, so I know it's not the code I wrote or the Asset Publisher.

    In comparing permissions for the Guest user in this instance of Liferay and the others that display the events, I see a permission that I am unable to set. It appears that the Guest Summary permissions listing lists "Calendar: Add to Page", but this option is not listed in the instance that is not displaying the events. Do you know why this permission is NOT listed or where I can adjust the settings to readd it? All of my other instance that the code works in have this permission listed, by default in the Summary. I don't even see the option "Add to Page" when I view the calendar's permissions under Site Administration > Applications > Calendar.

    I think it is also worth noting that when I do try to change the Guest Permissions in Administration > Applications > Calendar, I'm getting a "Role currently unavailable" error when I click save.

    Thanks again!
    thumbnail
    7年前 に Andrew Jordan によって更新されました。

    RE: Application Display Template not displaying events for guest users in L (回答)

    Junior Member 投稿: 39 参加年月日: 15/11/02 最新の投稿
    Revisited this after some time.

    I found that if I removed the tags I was using to filter events the AP allowed the events to viewed by the Guest user. Not sure why this is the case.