This is an automated email from the ASF dual-hosted git repository.
jleroux pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/trunk by this push: new 57805ae Fixed: Error removing an uploaded party content 57805ae is described below commit 57805aebabaee62736ecf8c99810b5b673a2e37e Author: Jacques Le Roux <[hidden email]> AuthorDate: Fri Apr 17 17:19:08 2020 +0200 Fixed: Error removing an uploaded party content (OFBIZ-11597) When you try to remove an uploaded party content you get this error: ControlServlet |E| Error in request handler: org.apache.ofbiz.webapp.control.RequestHandlerException: Unknown request [removePartyContent/viewprofile]; this request does not exist or cannot be called directly. While at it I also fixed the similar case for payment methods --- applications/party/template/party/profileblocks/ContentList.ftl | 4 ++-- applications/party/template/party/profileblocks/PaymentMethods.ftl | 6 +++++- applications/party/webapp/partymgr/WEB-INF/controller.xml | 7 +++++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/applications/party/template/party/profileblocks/ContentList.ftl b/applications/party/template/party/profileblocks/ContentList.ftl index 4cc6919..49a505c 100644 --- a/applications/party/template/party/profileblocks/ContentList.ftl +++ b/applications/party/template/party/profileblocks/ContentList.ftl @@ -38,7 +38,7 @@ under the License. <#if (content.contentName?has_content)> <a href="<@ofbizUrl>stream?contentId=${(content.contentId)!}</@ofbizUrl>" target="_blank">${uiLabelMap.CommonView}</a> </#if> - <form name="removePartyContent_${pContent_index}" method="post" action="<@ofbizUrl>removePartyContent/viewprofile</@ofbizUrl>"> + <form name="removePartyContent_${pContent_index}" method="post" action="<@ofbizUrl>removePartyContent</@ofbizUrl>"> <input type="hidden" name="contentId" value="${pContent.contentId}" /> <input type="hidden" name="partyId" value="${pContent.partyId}" /> <input type="hidden" name="partyContentTypeId" value="${pContent.partyContentTypeId}" /> @@ -52,4 +52,4 @@ under the License. <#else> ${uiLabelMap.PartyNoContent} </#if> - </div> \ No newline at end of file + </div> diff --git a/applications/party/template/party/profileblocks/PaymentMethods.ftl b/applications/party/template/party/profileblocks/PaymentMethods.ftl index a5ed3b8..aa0abe5 100644 --- a/applications/party/template/party/profileblocks/PaymentMethods.ftl +++ b/applications/party/template/party/profileblocks/PaymentMethods.ftl @@ -192,7 +192,11 @@ under the License. </#if> <#if security.hasEntityPermission("PAY_INFO", "_DELETE", session) || security.hasEntityPermission("ACCOUNTING", "_DELETE", session)> - <a href="<@ofbizUrl>deletePaymentMethod/viewprofile?partyId=${partyId}&paymentMethodId=${paymentMethod.paymentMethodId}</@ofbizUrl>">${uiLabelMap.CommonExpire}</a> + <form name="deletePaymentMethod_${paymentMethod.paymentMethodId}" method="post" action="<@ofbizUrl>deletePaymentMethod</@ofbizUrl>"> + <input type="hidden" name="partyId" value="${partyId}" /> + <input type="hidden" name="paymentMethodId" value="${paymentMethod.paymentMethodId}" /> + <input type="submit" value="${uiLabelMap.CommonExpire}"/> + </form> <#else> </#if> diff --git a/applications/party/webapp/partymgr/WEB-INF/controller.xml b/applications/party/webapp/partymgr/WEB-INF/controller.xml index 1936fca..b88c306 100644 --- a/applications/party/webapp/partymgr/WEB-INF/controller.xml +++ b/applications/party/webapp/partymgr/WEB-INF/controller.xml @@ -1028,8 +1028,11 @@ under the License. <request-map uri="removePartyContent"> <security auth="true" https="true"/> <event type="service" invoke="removePartyContent"/> - <response name="success" type="request-redirect" value="EditPartyContents"> - <redirect-parameter name="partyId"></redirect-parameter> + <response name="success" type="request-redirect" value="viewprofile"> + <redirect-parameter name="partyId"/> + </response> + <response name="error" type="request-redirect" value="viewprofile"> + <redirect-parameter name="partyId"/> </response> </request-map> |
Free forum by Nabble | Edit this page |