Bug 109990

Summary: Unable to publish a form item
Product: [Retired] Red Hat Enterprise CMS Reporter: Daniel BerrangĂ© <berrange>
Component: otherAssignee: ccm-bugs-list
Status: CLOSED RAWHIDE QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-12-10 20:09:49 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 100952    

Description Daniel Berrangé 2003-11-13 19:09:36 UTC
Description of problem:
It is not possible to publish a FormItem since persistence throws an
error about a compulsory association not being set. The root cause of
this problem is that c.a.cms.formbuilder.FormCopier is overly
aggressive about calling save() on objects it is copying.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create a Form Item
2. Add a Text Field
3. Make text field answer compulsory
4. Publish the form

Actual results:
com.redhat.persistence.FlushException: Unable to send all events to
database for object [com.arsdigita.formbuilder.Listener:{id=10009}]
because these required properties are null:
 [com.arsdigita.formbuilder.Listener:{id=10009}].widget
        at
com.redhat.persistence.Session.assertFlushed(Session.java(Inlined
Compiled Code))
        at
com.arsdigita.persistence.DataObjectImpl.assertFlushed(DataObjectImpl.java(Compiled
Code))
        at
com.arsdigita.persistence.DataObjectImpl.save(DataObjectImpl.java:422)
        at com.arsdigita.domain.DomainObject.save(DomainObject.java:315)
        at
com.arsdigita.cms.formbuilder.FormCopier.copyObject(FormCopier.java:171)
        at
com.arsdigita.cms.formbuilder.FormCopier.copySingleObject(FormCopier.java:223)
        at
com.arsdigita.cms.formbuilder.FormCopier.copyDataObjectAssociation(FormCopier.java:188)
        at
com.arsdigita.cms.formbuilder.FormCopier.copyWidget(FormCopier.java:137)
        at
com.arsdigita.cms.formbuilder.FormCopier.copySingleObject(FormCopier.java:219)
        at
com.arsdigita.cms.formbuilder.FormCopier.copyDataObjectAssociation(FormCopier.java:188)
        at
com.arsdigita.cms.formbuilder.FormCopier.copyFormSection(FormCopier.java:68)
        at
com.arsdigita.cms.formbuilder.FormCopier.copyForm(FormCopier.java:55)
        at
com.arsdigita.cms.formbuilder.FormItem.copyProperty(FormItem.java:149)
        at
com.arsdigita.cms.ObjectCopier.copyProperty(ObjectCopier.java:115)
        at com.arsdigita.cms.DomainCopier.copyData(DomainCopier.java:185)
        at com.arsdigita.cms.DomainCopier.copy(DomainCopier.java:130)
        at com.arsdigita.cms.VersionCopier.copy(VersionCopier.java:137)
        at
com.arsdigita.cms.VersionCopier.createVersion(VersionCopier.java:243)
        at com.arsdigita.cms.VersionCopier.copyItem(VersionCopier.java:95)
        at
com.arsdigita.cms.ContentItem.createPendingVersion(ContentItem.java:1596)
        at com.arsdigita.cms.ContentItem.publish(ContentItem.java:1228)
        at
com.arsdigita.cms.ui.lifecycle.ItemLifecycleSelectForm$ProcessListener.process(ItemLifecycleSelectForm.java:412)
        at
com.arsdigita.bebop.FormSection.fireProcess(FormSection.java:490)
        at com.arsdigita.bebop.FormSection$4.process(FormSection.java:464)
        at
com.arsdigita.bebop.FormModel.fireFormProcess(FormModel.java:475)
        at com.arsdigita.bebop.FormModel.process(FormModel.java:342)
        at com.arsdigita.bebop.Form.process(Form.java:440)
        at com.arsdigita.bebop.Form.respond(Form.java:281)
        at com.arsdigita.bebop.PageState.respond(PageState.java:367)
        at com.arsdigita.bebop.Page.process(Page.java:701)
        at com.arsdigita.bebop.Page.process(Page.java:683)
        at com.arsdigita.bebop.Page.buildDocument(Page.java:737)
        at
com.arsdigita.cms.dispatcher.CMSPage$1.excurse(CMSPage.java:280)
        at com.arsdigita.cms.CMSExcursion$1.excurse(CMSExcursion.java:80)
        at
com.arsdigita.kernel.KernelExcursion.run(KernelExcursion.java:57)
        at com.arsdigita.cms.CMSExcursion.run(CMSExcursion.java:75)
        at com.arsdigita.cms.dispatcher.CMSPage.dispatch(CMSPage.java:294)
        at
_packages._content_22dsection._www._admin._item__jsp._jspService(_item__jsp.java:61)


Expected results:
The item is published

Additional info:
See related note about 1..1 associations in 

https://listman.redhat.com/archives/redhat-ccm-list/2003-September/msg00105.html

Comment 1 Daniel Berrangé 2003-11-13 19:10:12 UTC
Fixed on dev in p4 37980.

Needs to be ported to Troika too.


Comment 2 Archit Shah 2003-11-18 21:48:10 UTC
applied to 6.0.x (38130)