View Issue Details

IDProjectCategoryView StatusLast Update
197Composrldappublic2011-01-10 09:48
ReporterGuest Assigned ToChris Graham  
PrioritynormalSeverityminor 
Status resolvedResolutionfixed 
Summary197: Member list and group list crashes.
DescriptionWhen any user: admin, or LDAP user try to open Member list or Usergroups list from the Community block in the left panel, an error appears:

Unfortunately a query has failed [SELECT g.*,t0.text_original AS t0__text_original,t0.text_parsed AS t0__text_parsed,t1.text_original AS t1__text_original,t1.text_parsed AS t1__text_parsed FROM cms4_f_groups g LEFT JOIN cms4_translate t0 ON t0.id=g_name AND t0.language='LV' LEFT JOIN cms4_translate t1 ON t1.id=g_title AND t1.language='LV' WHERE g.id=] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1] (version: 4.3.2, PHP version: 5.2.13, URL: /data/iframe.php?zone=site&wide_high=1&page=members&type=misc)

Steps To Reproducea) set up LDAP
b)login with any user
c) try to open comunity-> Members or Usergroups
Additional InformationI found in FORUM that similar problem was found on 29 January 2009, 1:45 PM #47736.

I copied the code in the funcion cns_long_cn_to_to_short_cn, but no progress. I found out that there was some commented lines, but uncommenting them did not helped. Also the funcion now is rewrited and asks two params (before was 1).

Solution:
edit file: sources/cns_members.php
funcion: cns_get_member_primary_group($member_id)

comment all content.
add lines:
$id=$GLOBALS['CNS_DRIVER']->get_member_row_field($member_id, 'm_primary_group');
return $id;

May be that the real problem is not in this funcion, but in "cns_ldap_get_member_primary_group", but that is job for Chris ;) .
TagsNo tags attached.
Attach Tags
Time estimation (hours)
Sponsorship open

Sponsor

Date Added Member Amount Sponsored

Activities

Chris Graham

2010-07-23 15:34

administrator   ~70

Hi,

I'm going to have a hard time debugging this as I don't currently have an AD system to test on. I do believe it is a problem with cns_ldap_get_member_primary_group. If you could debug or grant me access to your system to debug, that would help get this resolved.

Guest

2010-07-23 15:51

reporter   ~72

my system is not in Internet. I don't know when I'll have time to debug this, but I'll try.

Chris Graham

2011-01-10 09:48

administrator   ~111

A member is in a group that hasn't been imported. Composr considers that NULL and incorrectly assigns that as the primary group.

The fix (now implemented) is to revert to the default group in this situation. The given fix is also probably acceptable.

Issue History

Date Modified Username Field Change