Index: openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 30 Jan 2006 02:04:51 -0000 1.4 +++ openacs-4/packages/xowiki/tcl/xowiki-sc-procs.tcl 24 Feb 2006 14:30:18 -0000 1.5 @@ -51,8 +51,7 @@ set page [::Generic::CrItem instantiate -item_id 0 -revision_id $revision_id] $page volatile set folder_id [$page set parent_id] - set pid [db_string get_package_id \ - "select package_id from acs_objects where object_id = $folder_id"] + set pid [db_string get_pid "select package_id from cr_folders where folder_id = $folder_id"] if {$pid > 0} { return "[site_node::get_url_from_object_id -object_id $pid]pages/[ad_urlencode [$page set title]]" } else { Index: openacs-4/packages/xowiki/www/edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/Attic/edit.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/xowiki/www/edit.tcl 14 Feb 2006 14:02:31 -0000 1.8 +++ openacs-4/packages/xowiki/www/edit.tcl 24 Feb 2006 14:30:18 -0000 1.9 @@ -26,9 +26,21 @@ set page [CrItem instantiate -item_id $item_id] ;# no revision_id yet set folder_id [$page set parent_id] set object_type [$page info class] - ::xowiki::Page require_folder_object -folder_id $folder_id -package_id [ad_conn package_id] + if {$object_type eq "::xowiki::Object" && [$page set title] eq "::$folder_id"} { + # if we edit the folder object, we have to do some extra magic here, since + # the folder object has slightly different naming conventions. + if {[info command ::$folder_id] eq ""} { + ns_cache flush xotcl_object_cache $page + $page move ::$folder_id + } + set page ::$folder_id + $page set package_id [ad_conn package_id] + } else { + $page volatile + ::xowiki::Page require_folder_object -folder_id $folder_id -package_id [ad_conn package_id] + } } else { - set page [$object_type new] + set page [$object_type new -volatile] set folder_id [::xowiki::Page require_folder -name xowiki] $page set parent_id $folder_id } Index: openacs-4/packages/xowiki/www/view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/Attic/view.adp,v diff -u -r1.9 -r1.10 --- openacs-4/packages/xowiki/www/view.adp 12 Feb 2006 01:21:38 -0000 1.9 +++ openacs-4/packages/xowiki/www/view.adp 24 Feb 2006 14:30:18 -0000 1.10 @@ -49,7 +49,7 @@