Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Liferay comments not working inside search-container in DXP 7.2
Hello Everyone,I have a page where I am displaying a list of posts. I want to implement like and comment functionality for each post. Like Api is working well in my case but comments are not working. I am following the approach given here https://help.liferay.com/hc/en-us/articles/360028726072-Adding-Comments-to-Your-App.
The code in my jsp is like:
<liferay-ui:ratings className="<%=FormService.class.getName()%>" classPK="<%=aForm.getPrimaryKey()%>" type="like"/>
<liferay-ui:panel-container extended="<%=false%>" id="formPanelContainer" persistState="<%=true%>">
<liferay-ui:panel collapsible="<%=true%>" extended="<%=true%>" id="userCommentsPanel" persistState="<%=true%>" title="comments">
<portlet:actionURL name="invokeTaglibDiscussion" var="discussionURL" />
<liferay-comment:discussion className="<%=FormService.class.getName()%>"
classPK="<%=aForm.getPrimaryKey()%>"
formAction="<%=discussionURL%>" formName="form2"
ratingsEnabled="<%=true%>"
redirect="<%= PortalUtil.getCurrentURL(request)%>"
userId="<%=aForm.getUserId()%>" />
</liferay-ui:panel>
</liferay-ui:panel-container>
Here <portlet:actionURL name="invokeTaglibDiscussion" var="discussionURL" /> may be causing any problem? As invokeTaglibDiscussion is deprecated in DXP 7.2. Can anyone please suggest any alternative solution to this?
Thanks in advance!!
The code in my jsp is like:
<liferay-ui:ratings className="<%=FormService.class.getName()%>" classPK="<%=aForm.getPrimaryKey()%>" type="like"/>
<liferay-ui:panel-container extended="<%=false%>" id="formPanelContainer" persistState="<%=true%>">
<liferay-ui:panel collapsible="<%=true%>" extended="<%=true%>" id="userCommentsPanel" persistState="<%=true%>" title="comments">
<portlet:actionURL name="invokeTaglibDiscussion" var="discussionURL" />
<liferay-comment:discussion className="<%=FormService.class.getName()%>"
classPK="<%=aForm.getPrimaryKey()%>"
formAction="<%=discussionURL%>" formName="form2"
ratingsEnabled="<%=true%>"
redirect="<%= PortalUtil.getCurrentURL(request)%>"
userId="<%=aForm.getUserId()%>" />
</liferay-ui:panel>
</liferay-ui:panel-container>
Here <portlet:actionURL name="invokeTaglibDiscussion" var="discussionURL" /> may be causing any problem? As invokeTaglibDiscussion is deprecated in DXP 7.2. Can anyone please suggest any alternative solution to this?
Thanks in advance!!
Hi ,
I am using using the discussion tab inside the search container. Can anyone please let me know how it will work. The form is getting submitted on clicking Reply but no comment is being saved. Its showing warning
Method "invokeTaglibDiscussion" not found.
on my JSP.
Thanks in advance
I am using using the discussion tab inside the search container. Can anyone please let me know how it will work. The form is getting submitted on clicking Reply but no comment is being saved. Its showing warning
Method "invokeTaglibDiscussion" not found.
on my JSP.
Thanks in advance
Hi,
There seems to some issue in liferay. If I am trying to override invokeTaglibDiscussion in portlet class which is extending MVCPortlet, its giving compile time error. As i checked this method is now deprecated. Can anyone pls give solution for this.
Thanks
There seems to some issue in liferay. If I am trying to override invokeTaglibDiscussion in portlet class which is extending MVCPortlet, its giving compile time error. As i checked this method is now deprecated. Can anyone pls give solution for this.
Thanks
Hi Developers,If anyone faced this issue in Liferay 7.2 please advice how to resolve this.Thanks in Advance!
Hi,
Remove the formAction , if you want to use the default action .In case you want to write your own implementation then you can use formAction.
Remove the formAction , if you want to use the default action .In case you want to write your own implementation then you can use formAction.
<liferay-comment:discussion className="<%=FormService.class.getName()%>" classPK="<%=aForm.getPrimaryKey()%>" formName="form2" ratingsEnabled="<%=true%>" redirect="<%= PortalUtil.getCurrentURL(request)%>" userId="<%=aForm.getUserId()%>" />
Thanks