Forum OpenACS Q&A: Re: Installing Contacts?

Collapse
8: Re: Installing Contacts? (response to 1)
Posted by Christof Spitz on
You're great, Nima. I have to grep that later, since I am in a hurry. I installed ACS Translation Storage first, and then contacts installed! But sorry to bother you again ... see what happens when I try to add a person or organisation:

Database operation "select" failed (exception NSDB, "Query was not a statement returning rows.")

FEHLER: Relation ᄏdotlrn_communities_allᆱ existiert nicht

(doesn't exist)

SQL:
select groups.group_id,
acs_objects.title as group_name,
( select count(distinct gamm.member_id) from group_approved_member_map gamm where gamm.group_id = groups.group_id ) as member_count,
( select count(distinct gcm.component_id) from group_component_map gcm where gcm.group_id = groups.group_id) as component_count,
CASE WHEN contact_groups.package_id is not null THEN '1' ELSE '0' END as mapped_p,
CASE WHEN default_p THEN '1' ELSE '0' END as default_p
from groups left join contact_groups on ( groups.group_id = contact_groups.group_id ), acs_objects
where groups.group_id not in ('-1','-2')
and groups.group_id = acs_objects.object_id
and groups.group_id not in ( select gcm.component_id from group_component_map gcm where gcm.group_id != -1 )
and groups.group_id not in (select community_id from dotlrn_communities_all)
order by mapped_p desc, CASE WHEN contact_groups.default_p THEN '000000000' ELSE upper(groups.group_name) END

while executing
"ns_pg_bind select nsdb0 {
select groups.group_id,
acs_objects.title as group_name,
( select count(distinct gamm.member_id) f..."
("uplevel" body line 1)

Seems Contacts need dotlrn installed.

Collapse
Posted by Malte Sussdorff on
Well.... According to my sources (grep for dotlrn_communities_all), this part should not even be called. Maybe you had a broken .LRN installation). Here is the full code:

set dotlrn_installed_p [apm_package_installed_p dotlrn]
if { $dotlrn_installed_p } {
set filter_clause "and groups.group_id not in (select community_id from dotlrn_communities_all)"
} else {
set filter_clause ""
}

As this is the only place with this query, there is a clear check here. Obviously you could put this into a callback, so whoever has the time and the courage to do it is welcome to do so.