Forum OpenACS Development: OpenACS Group Types: Functionaltiy broken

Hi!

We are trying to define a new group type called "Ticket Queue" (as in Helpdesk) and would like to use the OpenACS group and group type management functionality for this. However the functionality is broken in OpenACS 5.7.0 (I don't believe anybody uses this functionality anymore, so I guess this is still broken in the latest version).

Please find below our diff. Basically, somebody tried to double-encode the return_url in group-types/one.tcl and added relationship attributes to the ad_form for creating groups in groups/new.tcl.

Cheers!
Frank

Index: www/admin/group-types/one.tcl
===================================================================
RCS file: /home/cvsroot/acs-subsite/www/admin/group-types/one.tcl,v
retrieving revision 1.3
diff -r1.3 one.tcl
27c27
< set return_url_enc [ad_urlencode [ad_conn url]?[ad_conn query]]
---

set return_url [ad_conn url]?[ad_conn query]
81c81
< set one_attribute_url [export_vars -url -base "../attributes/one" {attribute_id {return_url $return_url_enc}}]
---
set one_attribute_url [export_vars -url -base "../attributes/one" {attribute_id return_url}]
98c98
< 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}}]
---
set add_group_url [export_vars -url -base "../parties/new" {{party_type $group_type} {add_with_rel_type composition_rel} return_url }]
100c100
< set add_attribute_url [export_vars -url -base "../attributes/add" {{object_type $group_type} {return_url $return_url_enc}}]
---
set add_attribute_url [export_vars -url -base "../attributes/add" {{object_type $group_type} return_url}]
cvs diff: Diffing www/admin/groups
Index: www/admin/groups/new.tcl
===================================================================
RCS file: /home/cvsroot/acs-subsite/www/admin/groups/new.tcl,v
retrieving revision 1.2
diff -r1.2 new.tcl
119c119
< attribute::add_form_elements -form_id add_group -variable_prefix rel -start_with relationship -object_type $add_with_rel_type
---
# attribute::add_form_elements -form_id add_group -variable_prefix rel -start_with relationship -object_type $add_with_rel_type
Collapse
Posted by Frank Bergmann on
Found another issue with the double-quoted return_url and adding relationship fields to a form that even results in a hard error adding members to a group:

Index: www/admin/groups/elements-by-rel-type.tcl
===================================================================
RCS file: /home/cvsroot/acs-subsite/www/admin/groups/elements-by-rel-type.tcl,v
retrieving revision 1.3
diff -r1.3 elements-by-rel-type.tcl
71c71
< set relations_add_url [export_vars -url -base "../relations/add" {group_id rel_type {return_url $return_url_enc}}]
---

set relations_add_url [export_vars -url -base "../relations/add" {group_id rel_type return_url}]

Index: www/admin/relations/add.tcl
===================================================================
RCS file: /home/cvsroot/acs-subsite/www/admin/relations/add.tcl,v
retrieving revision 1.2
diff -r1.2 add.tcl
48a49

150c151
< attribute::add_form_elements -form_id add_relation -start_with relationship -object_type $rel_type
---
# attribute::add_form_elements -form_id add_relation -start_with relationship -object_type $rel_type
Collapse
Posted by Antonio Pisano on
At first sight your starting code seems current. Could you please provide the steps to reproduce the issue?

I will check them with an up-to-date installation and see if your fix applies.

Thanks in advance

Collapse
Posted by Antonio Pisano on
I've committed a fix. Thanks for reporting!
Collapse
Posted by Antonio Pisano on
Sorry, I've been imprecise: I have fixed only the "double quoting" problem, that was very evident.

About the rest, I still need your kind report of the steps to reproduce the issue.