Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl,v diff -u -N -r1.130 -r1.131 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 19 Sep 2018 00:55:36 -0000 1.130 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.tcl 6 Oct 2018 09:28:38 -0000 1.131 @@ -1622,15 +1622,25 @@ set url [site_node::get_url -node_id $parent_node_id] site_node::update_cache -sync_children -node_id $node_id -url $url + # + # The parent_node_id should in a mount operation never be + # empty. + # ::acs::site_nodes_cache flush_pattern -partition_key $parent_node_id get_children-$parent_node_id-* - # DAVEB update context_id if it is passed in some code relies + # + # DAVEB: update context_id if it is passed in some code relies # on context_id to be set by instantiate_and_mount so we can't # assume anything at this point. Callers that need to set # context_id for example, when an unmounted package is - # mounted, should pass in the correct context_id + # mounted, should pass in the correct context_id. + # if {[info exists context_id]} { - db_dml update_package_context_id "" + db_dml update_package_context_id { + update acs_objects + set context_id = :context_id + where object_id = :object_id + } } set package_key [apm_package_key_from_id $object_id] @@ -1673,7 +1683,9 @@ ::xo::site_node flush_cache -node_id $node_id -with_subtree $sync_children_p -url $url set parent_node_id [site_node::get_parent_id -node_id $node_id] - ::xo::site_node flush_pattern -partition_key $parent_node_id get_children-$parent_node_id-* + if {$parent_node_id ne ""} { + ::xo::site_node flush_pattern -partition_key $parent_node_id get_children-$parent_node_id-* + } } ad_proc -public site_node::get { Index: openacs-4/packages/acs-tcl/tcl/site-nodes-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/site-nodes-procs.xql,v diff -u -N -r1.14 -r1.15 --- openacs-4/packages/acs-tcl/tcl/site-nodes-procs.xql 11 Apr 2008 22:37:12 -0000 1.14 +++ openacs-4/packages/acs-tcl/tcl/site-nodes-procs.xql 6 Oct 2018 09:28:38 -0000 1.15 @@ -17,15 +17,7 @@ - - - update acs_objects - set context_id = :context_id - where object_id = :object_id - - - update site_nodes