svn commit: r1748907 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java

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

svn commit: r1748907 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java

pranayp
Author: pranayp
Date: Sat Jun 18 05:29:06 2016
New Revision: 1748907

URL: http://svn.apache.org/viewvc?rev=1748907&view=rev
Log:
[OFBIZ-1191] Applied patch from the ticket. Fixed creation of a new forum in Content Manager. Content Association wasn't being created because of missing contentIdTo.

Steps to reproduce:
1) Go to content component
2) Click on Forum tab
3) Select WebStoreForum : https://localhost:8443/content/control/findForums?forumGroupId=WebStoreFORUM
4) Add new forum for this Forum Group.

Result: Created forum is not getting displayed.

Thanks late Adrian Crum for reporting the issue and Mohammed Rehan Khan for providing the patch.




Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java?rev=1748907&r1=1748906&r2=1748907&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/ContentManagementServices.java Sat Jun 18 05:29:06 2016
@@ -364,6 +364,10 @@ public class ContentManagementServices {
             }
         }
 
+        // Put contentId
+        if (UtilValidate.isNotEmpty(contentId)) {
+            contentAssoc.put("contentIdTo", contentId);
+        }
         // If parentContentIdTo or parentContentIdFrom exists, create association with newly created content
         if (Debug.infoOn()) {
             Debug.logInfo("CREATING contentASSOC contentAssocTypeId:" + contentAssocTypeId, module);