Forum OpenACS Q&A: Re: Group creation

Collapse
2: Re: Group creation (response to 1)
Posted by Dave Bauer on
I think you are correct. Can you track down what page is generating that URL?

It looks like its going to /admin/groups/admin/group/-types/one which probably is not correct. Some of the slashes are URLencoded which is defnitely wrong. I suspect somehwere a return_url query parameter got messed up.

Note those group admin pages are rarely/never used and most groups are created programatically. It should do what you want if you create it through the web UI, but if its a commmon thing you'll need to do, you might want to look into a way to automate it with a subsite or package instantiation callback.

Collapse
4: Re: Group creation (response to 2)
Posted by Jeff Rogers on
Looks like it's /admin/groups/new that's generating the redirect.

Probably won't be very common - this is a personal project I'm working on and it's a long way away from doing anything particularly notable yet - but I am a strong advocate for having even the little things work correctly :)

Collapse
8: Re: Group creation (response to 4)
Posted by Jeff Rogers on
Dug in a little deeper, it looks like the problem is in acs-subsite/www/admin/group-types/one.tcl. It sets up return urls like so:


set return_url_enc [ad_urlencode [ad_conn url]?[ad_conn query]]
....
set add_group_url [export_vars -url -base "../parties/new" {{party_type $group_type} {add_with_rel_type composition_rel} {return_url $return_url_enc}}]

so the value gets encoded twice. I think it should be just

set return_url [ad_conn url]?[ad_conn query]
....
set add_group_url [export_vars -url -base "../parties/new" {{party_type $group_type} {add_with_rel_type composition_rel} return_url}]