[ofbiz-framework] branch release18.12 updated: Fixed: Create a blog article failed to link each contents (OFBIZ-12075)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch release18.12 updated: Fixed: Create a blog article failed to link each contents (OFBIZ-12075)

nmalin
This is an automated email from the ASF dual-hosted git repository.

nmalin pushed a commit to branch release18.12
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release18.12 by this push:
     new 310764f  Fixed: Create a blog article failed to link each contents (OFBIZ-12075)
310764f is described below

commit 310764f82a918c308d861bd6cce6cb6be4518038
Author: Nicolas Malin <[hidden email]>
AuthorDate: Mon Nov 30 09:14:39 2020 +0100

    Fixed: Create a blog article failed to link each contents
    (OFBIZ-12075)
   
    When you create a blog article with screen https://localhost:8443/content/control/EditBlogArticle?blogContentId=${blogId} by default you can create an article with a summary, an image and a long text.
   
    After the creation all content related to this article was created by impossible to display this article correctly. The problem come from the contentAssoc of each relation where the mapKey isn't populate.
   
    The root come from the conversion to entity-auto for the service createContent, where some seca are present and use some field to create some relation with attribute not present on a content (like the field mapKey)
   
    To correct this I the simple way is to authorize these fields, and think for the future how do better.
---
 applications/content/servicedef/services_content.xml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/applications/content/servicedef/services_content.xml b/applications/content/servicedef/services_content.xml
index ea0d701..4e42c4b 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"/>
+        <auto-attributes include="nonpk" mode="INOUT" optional="true" entity-name="ContentAssoc"/><!--useful to forward some fields waiting by some seca present
+                                                                                                      for historic reason but need refactoring it to isolate
+                                                                                                      correctly this functionality-->
         <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"/>