This is an automated email from the ASF dual-hosted git repository.
nmalin pushed a commit to branch trunk
in repository
https://gitbox.apache.org/repos/asf/ofbiz-framework.gitThe following commit(s) were added to refs/heads/trunk by this push:
new 12162a2 Fixed: Create a blog article failed to link each contents (OFBIZ-12075)
12162a2 is described below
commit 12162a2a9c567ff0aba6190983bbbab7004a33f7
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 e03ce6c..4466335 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"/>