Forum OpenACS Q&A: user-join -- allowing users to join their own sub-sites

I'm on 4.6/postgres/Linux and I want to allow users to join their own sub-subsites. In the docs [1], it alludes to that possibility by going to <subsite-URL>/register/user-join

However, I'm getting the following in my error log upon doing so. Can someone spot something here and point me in a direction? How do you permit users to join their subgroups?

NOTICE:  identifier "application_group__group_id_from_package_id" will be trunc\
ated to "application_group__group_id_fro"
[06/Mar/2003:09:18:53][27439.3076][-conn0-] Notice: RP (261.084 ms): error in r\
p_handler: serving GET /actors/register/user-join
        ad_url "/actors/register/user-join" maps to file "/web/mytlc/packages/a\
cs-subsite/www/register/user-join.adp"
errmsg is can't read "required_segment(segment_id)": no such variable
[06/Mar/2003:09:18:54][27439.3076][-conn0-] Error: GET http://mytlc.com/actors/\
register/user-join?
referred by ""
can't read "required_segment(segment_id)": no such variable
    while executing
"set segment_id $required_segment(segment_id)"
    invoked from within
"if {[template::form is_request join]} {

[1] https://openacs.org/doc/directory/

Collapse
Posted by Don Baccus on
There were some datamodel problems in the original ACS 4.2 implementation of subsites and groups.  I've fixed this to some extent in 4.6.1 and plan to complete the job for 4.6.2, which we hope to freeze a week from tomorrow.

As part of that work I'll be looking at the code that is supposed to let you join a subsite.

Thank you for letting me know what you find. I'm subscribing to this thread.
Just experimented with user-join today.  There are 3 lines of code which appear in 2 places in the file which need to be changed to:

    set segment_id $required_segments(segment_id)
    set cur_group_id $required_segments(group_id)
    set cur_rel_type $required_segments(rel_type)

(Basically, added an "s" to "required_segment".)

Also, if the user is already a member of the subsite application group, you will get an ugly error.  I guess this could be handled gracefully by checking "acs-rels" first.

I will log this into the bug-tracker.