When trying to Add Server, the process would always fail because of ldapdata_rwattrs, ldapdata_roattrs, and ldapdata_mappings failing because "NOT NULL" is set on them and the add server SQL query defines them as NULL on insert.

I never noticed this on a MySQL server, but this does happen on a Postgres Server.

I solved the problem (or worked around the problem) by ALTER'ing the "NOT NULL" flag for the given columns and allowing them to be NULL.

After doing the change, I was able to successfully Add Server under a Postgres Database.

By changing 'not null' => TRUE to 'not null' => FALSE, in ldapdata.install for ldapdata_rwattrs, ldapdata_roattrs, and ldapdata_mappings, this problem can be averted.

However, I am not certain whether or not this is a fix for real problem as this problem may be with Drupal's transparent handling of the different databases like Postgres and MySQL; Given that this works under MySQL without the above "NOT NULL" changes.

Comments

miglius’s picture

Agree that ldapdata_rwattrs, ldapdata_roattrs, and ldapdata_mappings can be changed 'not null' => FALSE.

miglius’s picture

Assigned: Unassigned » miglius
Status: Active » Fixed

Committed. You will have to reinstall the module to take advantage of the fix though. I will be providing upgrade scripts only in the beta releases.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.