Reputation: 202
I see a strange behavior with Calendar CE portlet. I just want to know what is the reason behind it.
My Calendar CE portlet (one that comes with liferay 6.2 GA3 package) was working fine but suddenly it stopped sending email notifications for Invitation(RSVP link).No errors shown in console. then after a while i discovered that using the below code in Portal-ext.properties causes this issue.
# Set whether or not private layouts are enabled. Set whether or not private
# layouts should be auto created if a user has no private layouts. If
# private layouts are not enabled, then the property
# "layout.user.private.layouts.auto.create" is assumed to be false.
layout.user.private.layouts.enabled=false
layout.user.private.layouts.auto.create=false
# Set whether or not public layouts are enabled. Set whether or not public
# layouts should be auto created if a user has no public layouts. If public
# layouts are not enabled, then the property
# "layout.user.public.layouts.auto.create" is assumed to be false.
layout.user.public.layouts.enabled=false
layout.user.public.layouts.auto.create=false
I use the above code just to disable My Profile & My Dashboard buttons in dropdown(TOP Right corner). and to disable private pages aswell.
I tested this. whenever i use the above code in portal-ext.properties Calendar can't send any emails. All other email functionalities are working same.
Please help me to fix this issue.
REF: https://www.liferay.com/community/forums/-/message_boards/message/54631418 Thanks.
Upvotes: 2
Views: 488
Reputation: 590
After some investigation, I think I can boil down the issue to the following lines in com.liferay.calendar.notification.NotificationTemplate(Lines 182-184):
PortletURL portletURL = PortletURLFactoryUtil.create(
serviceContext.getRequest(), PortletKeys.CALENDAR,
themeDisplay.getPlid(), ActionRequest.RENDER_PHASE);
What's happening here? Well, Liferay want's to send a Link to the Calendar in the Notification Email. To do so, they have to evaluate where the portlet lives. (Meaning, where you put it ;) ) As the User does not have any pages (and therefore no Calendar portlet on a page) this method is about to fail. To be honest, I can't offer you a solution how to tackle the Problem, but at least we have an idea, WHY this is happening. You could start with some try catch blocks and some debug output to investigate further if that really IS the root of the Problem. But I am quite confident that these things correlate.
Upvotes: 2