Index: openacs-4/packages/xowiki/tcl/package-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/package-procs.tcl,v diff -u -r1.332.2.115 -r1.332.2.116 --- openacs-4/packages/xowiki/tcl/package-procs.tcl 6 May 2022 18:36:29 -0000 1.332.2.115 +++ openacs-4/packages/xowiki/tcl/package-procs.tcl 22 Jun 2022 13:56:22 -0000 1.332.2.116 @@ -3068,6 +3068,10 @@ foreach child_item_id [::xo::db::CrClass get_child_item_ids -item_id $item_id] { :flush_references -item_id $child_item_id } + + # Cleanup instances of templates located in the same folder + ::xowiki::delete_instances_of_siblings -parent_id $item_id + $object_type delete -item_id $item_id :flush_references -item_id $item_id -name $name -parent_id $parent_id :flush_page_fragment_cache -scope agg