THis explains it in subsite::get_element
subsite::get_element__arg_parser
if { [empty_string_p $subsite_id] } {
set subsite_id [ad_conn subsite_id]
}
I can't figure out a safe way to handle thi, subsite::get also assumes a connection and it doesn't seem right to push the subsite_id parameter up to the community_url proc.
I will try fixing subsite::get to return the main subsite if not connected.