Index: openacs-4/packages/simulation/www/citybuild/object-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/citybuild/object-delete.tcl,v diff -u -r1.7 -r1.7.2.1 --- openacs-4/packages/simulation/www/citybuild/object-delete.tcl 30 Nov 2004 21:30:40 -0000 1.7 +++ openacs-4/packages/simulation/www/citybuild/object-delete.tcl 31 Oct 2006 10:13:03 -0000 1.7.2.1 @@ -10,6 +10,14 @@ if { [template::util::is_true $confirm_p] } { permission::require_write_permission -object_id $item_id + content::item::unset_live_revision -item_id $item_id + + # we need to unset the latest revision too, otherwise + # content_item__del will bomb + db_dml unset_latest_rev { + update cr_items set latest_revision = NULL + where item_id = :item_id + } bcms::item::delete_item -item_id $item_id ad_returnredirect -message "\"$item(title)\" has been deleted." $return_url