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 -r1.68.2.16 -r1.68.2.17 --- openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 1 Sep 2020 17:42:50 -0000 1.68.2.16 +++ openacs-4/packages/acs-subsite/tcl/subsite-procs.tcl 18 Jan 2021 18:10:10 -0000 1.68.2.17 @@ -1158,7 +1158,7 @@ set node_id [ad_conn subsite_node_id] } - array set subsite_node [site_node::get -node_id $node_id] + set subsite_node [site_node::get -node_id $node_id] util_driver_info -array driver_info set main_host $driver_info(hostname) @@ -1172,7 +1172,7 @@ } elseif {$node_id eq ""} { error "You must supply node_id when not connected." } else { - array set subsite_node [site_node::get -node_id $node_id] + set subsite_node [site_node::get -node_id $node_id] set request_vhost_p 0 # # Provide fallback values from the first configured driver @@ -1213,10 +1213,9 @@ set host $driver_info(hostname) } - set result "" if { $request_vhost_p } { - set root_p [expr {$subsite_node(parent_id) eq ""}] + set root_p [expr {[dict get $subsite_node parent_id] eq ""}] set search_vhost $host # TODO: This should be cached @@ -1235,24 +1234,31 @@ if {$mapped_vhost eq ""} { set result [subsite::get_url \ - -node_id $subsite_node(parent_id) \ + -node_id [dict get $subsite_node parent_id] \ -absolute_p $absolute_p \ -strict_p $strict_p \ -force_host $host] - append result "$subsite_node(name)/" + append result "[dict get $subsite_node name]/" } else { + # + # The subsite is nost-node mapped and addressed via this + # URL (as determied via the host header field). In this + # case, the path leading to the side-node must be removed, + # according to the documentation. + # set host $mapped_vhost + dict set subsite_node url / } - } + if {$result eq ""} { if {$absolute_p} { set result [util::join_location \ -proto $protocol \ -hostname $host \ -port $port] } - append result $subsite_node(url) + append result [dict get $subsite_node url] } return $result