Index: openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl,v diff -u -N -r1.64 -r1.65 --- openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 28 Nov 2018 16:47:38 -0000 1.64 +++ openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 28 Nov 2018 17:01:01 -0000 1.65 @@ -1252,11 +1252,12 @@ set root_p [expr {$subsite_node(parent_id) eq ""}] set search_vhost $host - set where_clause [db_map orderby] - # TODO: This should be cached - set site_node $subsite_node(node_id) - set mapped_vhost [db_string get_vhost {} -default ""] + set mapped_vhost [lindex [db_list get_vhost { + select host from host_node_map + where node_id = :node_id + order by host = :search_vhost desc + }] 0] if {$root_p && $mapped_vhost eq ""} { if {$strict_p} {