Index: openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl,v diff -u -r1.65 -r1.66 --- openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 27 Jun 2007 09:27:49 -0000 1.65 +++ openacs-4/packages/xowiki/tcl/xowiki-form-procs.tcl 1 Jul 2007 15:28:38 -0000 1.66 @@ -101,16 +101,9 @@ proc ::xowiki::page_templates {} { ::xowiki::f1 instvar data folder_id ;# form has to be named ::xowiki::f1 - # transitional code begin - set object_type [[$data info class] object_type] - if {[string match "::xowiki::*" $object_type]} { - set templateclass ::xowiki::PageTemplate - } else { - set templateclass ::PageTemplate - } - # transitional code end - set q [$templateclass instance_select_query \ + set q [::xowiki::PageTemplate instance_select_query \ -folder_id $folder_id \ + -with_subtypes false \ -select_attributes {name}] db_foreach [my qn get_page_templates] $q { lappend lpairs [list $name $item_id] Index: openacs-4/packages/xowiki/tcl/xowiki-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/xowiki-procs.tcl,v diff -u -r1.126 -r1.127 --- openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 29 Jun 2007 12:06:42 -0000 1.126 +++ openacs-4/packages/xowiki/tcl/xowiki-procs.tcl 1 Jul 2007 15:28:38 -0000 1.127 @@ -959,7 +959,10 @@ PageInstance instproc get_short_spec {name} { my instvar page_template - if {[$page_template exists form_constraints]} { + # in the old-fashioned 2-form page-instance create, page_template + # might be non-existant or empty. + if {[info exists page_template] && $page_template ne "" && + [$page_template exists form_constraints]} { foreach name_and_spec [$page_template form_constraints] { foreach {spec_name short_spec} [split $name_and_spec :] break if {$spec_name eq $name} {