Author: jleroux
Date: Fri Jun  3 20:36:25 2016
New Revision: 1746755

URL: http://svn.apache.org/viewvc?rev=1746755&view=rev
Log:
A patch from Ingo Wolfmayr for "Problem assigning contentassoc with different 
content assoc types" https://issues.apache.org/jira/browse/OFBIZ-7159

Go to: Content --> Content -> "WebStoreCONTENT" --> Association

Add an association:

ContentIdTo: CNTGIZMOS
ContentAssocTypeId: Alternate Locale
--> Create

add another via "create new association"
ContentIdTo: CNTGIZMOS
ContentAssocTypeId: Alternate Role
--> Create

The 2nd association is create with the ContentAssocTypeId of the first one 
created. You have to logout and login to clear that.

Cause: the selected ContentAssocTypeId does not change by selecting another 
value.
Solved it by removing to-scope="user"
I did look for reasons but could not find one
+ checked if everything is working
    create association works (first time)
    update works
    create further association works
I guess it is done to set the default value from the last selection, but it 
breaks functionality as you wont be able to change it.

jleroux: this was very old code (pre Apache era) which maybe worked before but 
does not longer. Anyway the old behaviour (if it worked) was very minor, so I 
see no problems removing it to have something working



Modified:
    ofbiz/trunk/applications/content/widget/content/ContentScreens.xml

Modified: ofbiz/trunk/applications/content/widget/content/ContentScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/widget/content/ContentScreens.xml?rev=1746755&r1=1746754&r2=1746755&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/widget/content/ContentScreens.xml 
(original)
+++ ofbiz/trunk/applications/content/widget/content/ContentScreens.xml Fri Jun  
3 20:36:25 2016
@@ -237,7 +237,6 @@ under the License.
                 <set field="contentId" from-field="parameters.contentId"/>
                 <set field="contentIdTo" from-field="parameters.contentIdTo"/>
                 <set field="contentAssocTypeId" 
from-field="parameters.contentAssocTypeId"  
default-value="${defaultContentAssocTypeId}"/>
-                <set field="contentAssocTypeId" 
from-field="contentAssocTypeId" to-scope="user"/>
                 <set field="fromDate" from-field="parameters.fromDate"/>
                 <entity-one entity-name="Content" value-field="currentValue"/>
             </actions>


Reply via email to