Forum OpenACS Q&A: Problem with admin/relations/add
I have installed Openacs 4.0 with Linux 7.2 and AOLServer 3.2 and
Postgresql 7.1.3.
i want that when i access the drop list
http://mydomain.com:8000/admin/relations/add?exact%5fp=t&rel%
5ftype=user%5fprofile&group%5fid=3125&return%5furl=%2fadmin%2fgroups%
2fone%3fgroup%5fid%3d3125&allow_out_of_scope_p=t
only appears the users with member_state 'approved'. It is when i
assign one account to a group.
I check that the add-postgresql.xql tcl file, do the select. I
believe that this is the query that to do it:
<fullquery name="select_parties">
<querytext>
select DISTINCT
case when groups.group_id is null then
case when persons.person_id is null
then 'INVALID'
else persons.first_names || ' ' ||
persons.last_name
end else
groups.group_name end as party_name,
p.party_id
from (select o.object_id as party_id
from acs_objects o,
(select ot.object_type from acs_object_types
ot, acs_object_types ot2
where ot.tree_sortkey between
ot2.tree_sortkey and tree_right(ot2.tree_s
ortkey)
and $start_with) t
where o.object_type = t.object_type) p left join
(select element_id
from group_element_map x, membership_rels w
where x.group_id = :group_id and x.rel_type
= :rel_type and x.rel_id = w.rel_i
d and w.member_state = 'approved'
UNION ALL
select :group_id::integer ) m on (p.party_id =
m.element_id) cross join
(select object_id
from all_object_party_privilege_map
where party_id = :user_id and privilege = 'read')
perm cross join
(select party_id
from rc_parties_in_required_segs
where group_id = :group_id
and rel_type = :rel_type) pirs $scope_query left
join
groups on (p.party_id = groups.group_id)
left join persons on (p.party_id = persons.person_id)
where
m.element_id is null
and p.party_id = perm.object_id
and p.party_id = pirs.party_id $scope_clause
</querytext>
because i has been trying that the query for example:
in the end of from clause i added:
left join membership_rels x on (m.rel_id = x.rel_id and
x.membership_rels.member_state = 'approved')
for that drop list only appears all member_state 'approved' in
membership_rels table, but always the log sent the message: exception
NSDB, "Query was not a statement return
ing rows."
What i can to do?