Index: openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl,v diff -u -r1.22.4.3 -r1.22.4.4 --- openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl 13 Sep 2014 15:24:28 -0000 1.22.4.3 +++ openacs-4/packages/acs-content-repository/tcl/content-item-procs.tcl 4 Nov 2014 16:00:50 -0000 1.22.4.4 @@ -241,6 +241,12 @@ return [db_0or1row get_item_folder "" -column_array local_array] } set table_name [db_string get_table_name "select table_name from acs_object_types where object_type=:content_type"] + while {$table_name eq ""} { + acs_object_type::get -object_type $content_type -array typeInfo + ns_log notice "no table for $content_type registered, trying '$typeInfo(supertype)' instead" + set content_type $typeInfo(supertype) + set table_name [db_string get_table_name "select table_name from acs_object_types where object_type=:content_type"] + } set table_name "${table_name}x" # get attributes of the content_item use the content_typex view return [db_0or1row get_item "" -column_array local_array]