Author: jleroux Date: Fri Jun 17 13:16:39 2016 New Revision: 1748854 URL: http://svn.apache.org/viewvc?rev=1748854&view=rev Log: A modified patch from Amardeep Singh Jhajj for "Error on deleting Content Type Attribute" https://issues.apache.org/jira/browse/OFBIZ-7369
Please find attached screenshot. Steps to regenerate: 1. Go to https://localhost:8443/content/control/EditContentTypeAttr 2. Add ContentTypeAttribute. 3. Now try to delete it from list, error occurs. The reason of error was missing default-entity-name in service entity-auto. jleroux: while trying I noticed that if you did not fill the attribute name you got a non readable error message, I forced the attribute name to optional=false Modified: ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml Modified: ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml?rev=1748854&r1=1748853&r2=1748854&view=diff ============================================================================== --- ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml (original) +++ ofbiz/trunk/applications/content/servicedef/services_contenttypes.xml Fri Jun 17 13:16:39 2016 @@ -67,8 +67,9 @@ under the License. <permission-service service-name="contentManagerPermission" main-action="CREATE"/> <auto-attributes include="pk" mode="IN" optional="true"/> <auto-attributes include="nonpk" mode="IN" optional="true"/> + <override name="attrName" optional="false"/> </service> - <service name="removeContentTypeAttr" engine="entity-auto" auth="true" invoke="delete"> + <service name="removeContentTypeAttr" engine="entity-auto" default-entity-name="ContentTypeAttr" auth="true" invoke="delete"> <description>Remove ContentTypeAttr</description> <permission-service service-name="contentManagerPermission" main-action="DELETE"/> <auto-attributes entity-name="ContentTypeAttr" include="pk" mode="IN" optional="false"/>

