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 -N -r1.28.2.33 -r1.28.2.34 --- openacs-4/packages/xowf/tcl/xowf-procs.tcl 1 Jul 2020 19:31:58 -0000 1.28.2.33 +++ openacs-4/packages/xowf/tcl/xowf-procs.tcl 10 Jul 2020 10:39:32 -0000 1.28.2.34 @@ -619,11 +619,19 @@ #:log START-CREATES if {$::xowf::sharedWorkflowDefinition} { if {[${:object} is_wf]} { - set :wf_container ::xowf::[${:object} revision_id] + set source_obj ${:object} } else { - set :wf_container ::xowf::[[${:object} page_template] revision_id] + set source_obj [${:object} page_template] } + set revision_id [$source_obj revision_id] + if {$revision_id == 0} { + set revision_id [::xo::db::sql::content_item get_live_revision \ + -item_id [$source_obj item_id]] + ns_log warning "xowf: tried to create a wf_container with revision_id 0 -> fixed to $revision_id" + } + set :wf_container ::xowf::$revision_id + # # Validate workflow container: We cannot trust the shared # definition in case some xowf-include files were changed. When @@ -1489,7 +1497,7 @@ } } - + WorkflowPage instproc debug_msg {msg} { #util_user_message -message $msg ns_log notice "--WF $msg"