Forums de discussion
NoSuchResourceActionException ADD_TO_PAGE error
Yan Paing, modifié il y a 10 années.
NoSuchResourceActionException ADD_TO_PAGE error
Regular Member Publications: 128 Date d'inscription: 11/03/10 Publications récentes
Hi ,
I am facing following error. Even i add permission to resource-actions/default.xml. Please advise. Thank you.
02:29:52,538 ERROR [http-bio-8080-exec-17][AdvancedPermissionChecker:933] com.liferay.portal.NoSuchResourceActionException: <myportlet War_id>#ADD_TO_PAGE
myJsp Page
<liferay-theme:defineObjects />
<portlet:defineObjects />
<%
PortletURL portletURL = renderResponse.createRenderURL();
%>
<liferay-ui:search-container emptyResultsMessage="no-phone-found" iteratorURL="<%=portletURL%>">
<liferay-ui:search-container-results total="myList" />
<liferay-ui:search-container-row className="test.mytseting.Info"
keyProperty="infoId" modelVar="info">
<liferay-ui:search-container-column-text name="Price" value="EEEEE"/>
<portlet:renderURL var="viewDetailsURL">
<portlet:param name="mvcView" value="/html/view/view.jsp" />
<portlet:param name="userId" value="info.getUserId()"/>
</portlet:renderURL>
<liferay-ui:search-container-column-text name="Details" value="Details" href="<%=viewDetailsURL %>"/>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator />
</liferay-ui:search-container>
default.xml
<portlet-resource>
<portlet-name>myPortletId</portlet-name>
<permissions>
<supports>
<action-key>CREATE</action-key>
<action-key>UPDATE</action-key>
<action-key>DELETE</action-key>
<action-key>VIEW</action-key>
<action-key>ADD_TO_PAGE</action-key>
</supports>
<site-member-defaults>
<action-key>VIEW</action-key>
<action-key>ADD_TO_PAGE</action-key>
</site-member-defaults>
<guest-defaults>
<action-key>VIEW</action-key>
<action-key>ADD_TO_PAGE</action-key>
</guest-defaults>
<guest-unsupported />
</permissions>
</portlet-resource>
I am facing following error. Even i add permission to resource-actions/default.xml. Please advise. Thank you.
02:29:52,538 ERROR [http-bio-8080-exec-17][AdvancedPermissionChecker:933] com.liferay.portal.NoSuchResourceActionException: <myportlet War_id>#ADD_TO_PAGE
myJsp Page
<liferay-theme:defineObjects />
<portlet:defineObjects />
<%
PortletURL portletURL = renderResponse.createRenderURL();
%>
<liferay-ui:search-container emptyResultsMessage="no-phone-found" iteratorURL="<%=portletURL%>">
<liferay-ui:search-container-results total="myList" />
<liferay-ui:search-container-row className="test.mytseting.Info"
keyProperty="infoId" modelVar="info">
<liferay-ui:search-container-column-text name="Price" value="EEEEE"/>
<portlet:renderURL var="viewDetailsURL">
<portlet:param name="mvcView" value="/html/view/view.jsp" />
<portlet:param name="userId" value="info.getUserId()"/>
</portlet:renderURL>
<liferay-ui:search-container-column-text name="Details" value="Details" href="<%=viewDetailsURL %>"/>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator />
</liferay-ui:search-container>
default.xml
<portlet-resource>
<portlet-name>myPortletId</portlet-name>
<permissions>
<supports>
<action-key>CREATE</action-key>
<action-key>UPDATE</action-key>
<action-key>DELETE</action-key>
<action-key>VIEW</action-key>
<action-key>ADD_TO_PAGE</action-key>
</supports>
<site-member-defaults>
<action-key>VIEW</action-key>
<action-key>ADD_TO_PAGE</action-key>
</site-member-defaults>
<guest-defaults>
<action-key>VIEW</action-key>
<action-key>ADD_TO_PAGE</action-key>
</guest-defaults>
<guest-unsupported />
</permissions>
</portlet-resource>
Yan Paing, modifié il y a 10 années.
RE: NoSuchResourceActionException ADD_TO_PAGE error
Regular Member Publications: 128 Date d'inscription: 11/03/10 Publications récentes
Hi
Is there any one knows that issue? I add permission in default.xml it is still showing error.
com.liferay.portal.NoSuchResourceActionException: phonelandingcontroller_WAR_phoneportlet#ADD_TO_PAGE
<portlet-resource>
<portlet-name>phonelandingcontroller_WAR_phoneportlet</portlet-name>
<permissions>
<supports>
<action-key>CREATE</action-key>
<action-key>႕UPDATE</action-key>
<action-key>DELETE</action-key>
<action-key>VIEW</action-key>
<action-key>ADD_TO_PAGE</action-key>
Is there any one knows that issue? I add permission in default.xml it is still showing error.
com.liferay.portal.NoSuchResourceActionException: phonelandingcontroller_WAR_phoneportlet#ADD_TO_PAGE
<portlet-resource>
<portlet-name>phonelandingcontroller_WAR_phoneportlet</portlet-name>
<permissions>
<supports>
<action-key>CREATE</action-key>
<action-key>႕UPDATE</action-key>
<action-key>DELETE</action-key>
<action-key>VIEW</action-key>
<action-key>ADD_TO_PAGE</action-key>
Tomáš Polešovský, modifié il y a 10 années.
RE: NoSuchResourceActionException ADD_TO_PAGE error
Liferay Master Publications: 676 Date d'inscription: 13/02/09 Publications récentes
Hi,
try to change it to:
Yan Paing:
<portlet-name>phonelandingcontroller_WAR_phoneportlet</portlet-name>
try to change it to:
<portlet-name>phonelandingcontroller</portlet-name>
Yan Paing, modifié il y a 10 années.
RE: NoSuchResourceActionException ADD_TO_PAGE error
Regular Member Publications: 128 Date d'inscription: 11/03/10 Publications récentes
Hi Tomas,
Thanks for suggest. I changed the portlet name to <portlet-name>phonelandingcontroller</portlet-name> but it is still the same issue. I created another portlet and tried again then there is no issue even the same code. May be because of liferay cache.
Thanks for suggest. I changed the portlet name to <portlet-name>phonelandingcontroller</portlet-name> but it is still the same issue. I created another portlet and tried again then there is no issue even the same code. May be because of liferay cache.
Tomáš Polešovský, modifié il y a 10 années.
RE: NoSuchResourceActionException ADD_TO_PAGE error
Liferay Master Publications: 676 Date d'inscription: 13/02/09 Publications récentes
Ahh, I see.
Probably the problem is that the resources are already created for your portlet.
Try to go to Control Panel -> Server Administration -> Script and execute as Groovy:
HTH.
Probably the problem is that the resources are already created for your portlet.
Try to go to Control Panel -> Server Administration -> Script and execute as Groovy:
import java.util.*;
import com.liferay.portal.service.*;
ResourceActionLocalServiceUtil.checkResourceActions("phonelandingcontroller_WAR_phoneportlet", ["ADD_TO_PAGE"], true);
HTH.
Corné Aussems, modifié il y a 10 années.
RE: NoSuchResourceActionException ADD_TO_PAGE error
Liferay Legend Publications: 1313 Date d'inscription: 03/10/06 Publications récentes
FYI I just suffered from the same:
Liferay Studio created somehow two identically name portlets, (maybe i banged my keyboard too much)
I removed the falty portlet and all was solved.
Liferay Studio created somehow two identically name portlets, (maybe i banged my keyboard too much)
I removed the falty portlet and all was solved.
<!--?xml version="1.0"?-->
<liferay-portlet-app>
<portlet>
<portlet-name>MyFooPortlet</portlet-name>
<icon>/icon.png</icon>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
<css-class-wrapper>MyFooPortlet-portlet</css-class-wrapper>
</portlet>
<portlet>
<portlet-name>MyFooPortlet</portlet-name>
<icon>/icon.png</icon>
<instanceable>true</instanceable>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>
/js/main.js
</footer-portlet-javascript>
<css-class-wrapper>MyFooPortlet-portlet</css-class-wrapper>
</portlet>
<role-mapper>
<role-name>administrator</role-name>
<role-link>Administrator</role-link>
</role-mapper>
<role-mapper>
<role-name>guest</role-name>
<role-link>Guest</role-link>
</role-mapper>
<role-mapper>
<role-name>power-user</role-name>
<role-link>Power User</role-link>
</role-mapper>
<role-mapper>
<role-name>user</role-name>
<role-link>User</role-link>
</role-mapper>
</liferay-portlet-app>
Eoin Hartnett, modifié il y a 7 années.
RE: NoSuchResourceActionException ADD_TO_PAGE error
New Member Publications: 9 Date d'inscription: 29/11/11 Publications récentes
I know this thread is old, but I'm hoping my finding can help someone else.
I had the exact same issue and in my case it was caused by the portlet ID used in liferay-display.xml not exactly matching the portlet name as defined in portlet.xml.
So for example my liferay-display.xml contained:
Whereas my portlet.xml contained:
So in this case changing the portlet ID property in liferay-display.xml to "sales-orders" resolved the issue.
Hope this helps,
Eoin
I had the exact same issue and in my case it was caused by the portlet ID used in liferay-display.xml not exactly matching the portlet name as defined in portlet.xml.
So for example my liferay-display.xml contained:
<display>
<category name="Sales">
<portlet id="[b]Sales Orders[/b]"></portlet>
</category>
</display>
Whereas my portlet.xml contained:
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" version="2.0">
<portlet>
<portlet-name>[b]sales-orders[/b]</portlet-name>
<display-name>Sales Orders</display-name>
<portlet-class>
.........</portlet-class></portlet></portlet-app>
So in this case changing the portlet ID property in liferay-display.xml to "sales-orders" resolved the issue.
Hope this helps,
Eoin