#197 - Member list and group list crashes.

  • By
  • Added
  • 19 views
Identifier #197
Issue type Minor issue (breaks specific functionality)
Title Member list and group list crashes.
Status Completed
Handling member Chris Graham
Addon ldap
Description When 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 reproduce

a) set up LDAP

b)login with any user

c) try to open comunity-> Members or Usergroups

Additional information I 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 ;) .
Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated