Index: openacs-4/packages/xowf/tcl/xowf-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowf/tcl/xowf-procs.tcl,v diff -u -r1.28.2.52 -r1.28.2.53 --- openacs-4/packages/xowf/tcl/xowf-procs.tcl 21 Apr 2021 11:01:13 -0000 1.28.2.52 +++ openacs-4/packages/xowf/tcl/xowf-procs.tcl 23 Apr 2021 13:57:36 -0000 1.28.2.53 @@ -380,11 +380,6 @@ Context instproc set_current_state {value} { set :current_state ${:wf_container}::$value - if {[info exists :form_obj] && [:isobject ::${:form_obj}]} { - # The form object in the cache is still that from the previous - # state, make sure we flush it. - ::${:form_obj} destroy - } } Context instproc get_current_state {} { @@ -483,6 +478,9 @@ set :form_id $form_id } } + Context instproc flush_form_object {} { + unset -nocomplain :form_obj + } Context instproc form_object {object} { set parent_id [$object parent_id] # After this method is activated, the form object of the form of @@ -1833,6 +1831,10 @@ # set ctx [::xowf::Context require [self]] set :state [$ctx get_current_state] + + # The form object in the cache is still that from the previous + # state, make sure we flush it. + $ctx flush_form_object } next }