Unknown column groupdn in field list query: UPDATE ldap_lookup...
fixed it adding groupdn to ldap_lookup table

alter table `ldap_lookup_associate` add column `groupdn` varchar (255)  NULL  COLLATE utf8_general_ci

Comments

kibblewhite’s picture

There is not meant to be a `groupdn` column in the 'ldap_lookup_associate' table?
I can not find in the code any reference of groupdn in this table, only 'ldap_lookup' which in the latest release of the source has this in:

//$Id: ldap_lookup.install,v 1.2 2007/09/26 09:57:27 kibble Exp $
/**
 * Implementation of hook_install().
 */
function ldap_lookup_install() {
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
        db_query("CREATE TABLE {ldap_lookup} (
                        sid  int NOT NULL auto_increment,
                        name varchar(255) NOT NULL default '',
                        status int NOT NULL default '0',
                        server varchar(255) NOT NULL default '',
                        port int(10) NOT NULL default '389',
                        tls int NOT NULL default '0',
                        basedn varchar(255) NOT NULL default '',
                        groupdn varchar(255) NOT NULL default '',
                        user_attr varchar(255) NOT NULL default '',
                        email_attr varchar(255) NOT NULL default '',
                        binddn varchar(255) NOT NULL default '',
                        bindpw varchar(255) NOT NULL default '',
                PRIMARY KEY (name),
                KEY sid (sid)
        ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");

        db_query("CREATE TABLE {ldap_lookup_associate} (
                        id int(10) unsigned NOT NULL auto_increment,
                        rid int(10) unsigned NOT NULL,
                        group_name varchar(255) NOT NULL,
                PRIMARY KEY (id),
                UNIQUE KEY id (id)
        ) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");

        break;
  }
}

/**
 * Implementation of hook_uninstall().
 */
function ldap_lookup_uninstall() {
        db_query('DROP TABLE {ldap_lookup}');
        db_query('DROP TABLE {ldap_lookup_assoicate}');
}

kibblewhite’s picture

Status: Active » Closed (fixed)
H3rnand3z’s picture

sorry I meant the ldap_lookup table. I was upgrading from previous version when I got this error I also got a missing ldap_lookup_associate table message, next time I will uninstall first.

Thanks