Index: openacs-4/packages/cookie-consent/tcl/cookie-consent-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/cookie-consent/tcl/cookie-consent-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/cookie-consent/tcl/cookie-consent-procs.tcl 17 Dec 2017 19:55:03 -0000 1.1 +++ openacs-4/packages/cookie-consent/tcl/cookie-consent-procs.tcl 18 Dec 2017 08:17:07 -0000 1.2 @@ -41,8 +41,18 @@ } { set dict [security::get_register_subsite] if {![dict exists $dict subsite_id]} { - set subsite_id [site_node::get_object_id \ - -node_id [dict get $dict host_node_id]] + set host_node_id [dict get $dict host_node_id] + if {$host_node_id == 0} { + # + # Provide compatibility with older versions of + # get_register_subsite, not returning the + # host_node_id. In such cases, we get the host_node_id + # via the URL + # + set node_info [site_node::get_from_url -url [dict get $dict url]] + set host_node_id [dict get $node_info node_id] + } + set subsite_id [site_node::get_object_id -node_id $host_node_id] } else { set subsite_id [dict get $dict subsite_id] }