This is an automated email from the ASF dual-hosted git repository.
mbrohl 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 c332322 Fixed: CMS add content not working. (OFBIZ-10833) c332322 is described below commit c332322017c93ba1c18ffbb8104d3ee58bdb2624 Author: Michael Brohl <[hidden email]> AuthorDate: Tue Feb 18 21:28:14 2020 +0100 Fixed: CMS add content not working. (OFBIZ-10833) This fixes the missing content association and wrong update of the parent content reported by Ingo Wolfmayr. Thanks Sebastian Berg for providing the patch. --- applications/content/servicedef/services_content.xml | 3 +++ applications/content/template/website/WebSiteCMSContent.ftl | 9 +++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/applications/content/servicedef/services_content.xml b/applications/content/servicedef/services_content.xml index 237cd1c..ea0d701 100644 --- a/applications/content/servicedef/services_content.xml +++ b/applications/content/servicedef/services_content.xml @@ -28,6 +28,9 @@ <permission-service service-name="genericContentPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="INOUT" optional="true"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> + <attribute name="contentAssocTypeId" type="String" mode="INOUT" optional="true"/> + <attribute name="contentIdFrom" type="String" mode="INOUT" optional="true"/> + <attribute name="contentIdTo" type="String" mode="INOUT" optional="true"/> <!-- TODO: the following fields are deprecated; but will not be removed until all services and callers are updated --> <attribute mode="IN" name="targetOperationList" optional="true" type="List"/> <attribute mode="IN" name="targetOperationString" optional="true" type="String"/> diff --git a/applications/content/template/website/WebSiteCMSContent.ftl b/applications/content/template/website/WebSiteCMSContent.ftl index 6929e87..67b3df9 100644 --- a/applications/content/template/website/WebSiteCMSContent.ftl +++ b/applications/content/template/website/WebSiteCMSContent.ftl @@ -154,14 +154,11 @@ <form name="cmsform" enctype="multipart/form-data" method="post" action="<@ofbizUrl>${formAction}</@ofbizUrl>" style="margin: 0;"> <#if (content?has_content)> <input type="hidden" name="dataResourceId" value="${(dataResource.dataResourceId)!}"/> - <input type="hidden" name="contentIdTo" value="${content.contentId}"/> + <input type="hidden" name="contentId" value="${content.contentId}"/> <#list requestParameters.keySet() as paramName> - <#if paramName == 'contentIdFrom'> - <input type="hidden" name="contentId" value="${requestParameters.get(paramName)}"/> - </#if> - <#if (paramName == 'contentAssocTypeId' || paramName == 'fromDate')> - <input type="hidden" name="${paramName}" value="${requestParameters.get(paramName)}"/> + <#if (paramName == 'contentIdFrom' || paramName == 'contentAssocTypeId' || paramName == 'fromDate')> + <input type="hidden" name="${paramName}" value="${requestParameters.get(paramName)}"/> </#if> </#list> <#else> |
Free forum by Nabble | Edit this page |