Index: openacs-4/packages/xowiki/www/admin/import.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/admin/import.tcl,v diff -u -r1.22 -r1.23 --- openacs-4/packages/xowiki/www/admin/import.tcl 13 Sep 2012 16:05:32 -0000 1.22 +++ openacs-4/packages/xowiki/www/admin/import.tcl 20 Jul 2013 15:48:35 -0000 1.23 @@ -46,9 +46,15 @@ foreach o [::xowiki::Page allinstances] { set preexists($o) 1 } - if {[catch {namespace eval ::xo::import $content} error]} { - #my msg "Error: $::errorInfo" - set msg "Error: $error\n$::errorInfo" + if {[catch {namespace eval ::xo::import $content} errorMsg]} { + set msg "Error: $errorMsg\n$::errorInfo" + ns_log notice $msg + # cleanup all objects, that did not exist before + foreach o [::xowiki::Page allinstances] { + if {![info exists preexists($o)]} { + if {[::xotcl::Object isobject $o]} {$o destroy} + } + } } else { set objects [list] foreach o [::xowiki::Page allinstances] {