I think I came across similar problem as the following issue:

https://drupal.org/node/1430428

I have Drupal 7 installed on Ubuntu 12.04 with Postgres 9.1.9
I have initially installed: ldap-7.x-2.0-beta5
I now have: ldap-7.x-2.x-dev

When I have installed ldap-7.x-2.0-beta5, I have turned on almost everything (i.e. Feeds, Authorization, View, Help, Test Module, Query, etc.) to do with LDAP module and started to set up a server, then Authorization (Groups) and Users.

I have configured so far so that I managed to create an user via admin/config/people/ldap/user/test. But it has stopped working for whatever the reason, so I decided to delete the server entry in attempt to start from the scratch.

I get the following error message when I attempt to delete the server at a disabled state:

This server (EU.XXXX.COM) may not be deleted or disabled because it is being used for ldap authentication.

Therefore, I have upgraded to ldap-7.x-2.x-dev and then only eanabled LDAP Authentication & LDAP Test Module. (I can still see User and Authentication tabs, probably because the data behind them are there from the earlier version install.)

Since the error message says it is because the server is used in LDAP Authentication and, just in case, it is also to do with other associations such as User, I enabled the server again and went back to User and Authentication to double check that nothing selects the server. At least it is all de-selected from the obvious associations such as the checkboxes or radioboxes next to the server name.

And I went back again to the server, disabled it, and attempted to delete by clicking the delete link and I still get the same error message.

Where else could there be that I can remove the server association? Or can it still be a bug there?

Just for your reference, I can delete fine if I just create a server with minimum details without any associating entry from Authentications or Users.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

backslash856’s picture

It's just too old, but it's still active :/ so just for others with the same problem i give my 2 cents.
I've got same problem and solved changing the domain with the old servers at:
authentication -> LDAP Account User Help URL
modify it with the new domain

backslash856’s picture

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

I encountered this bug and see why this is happening. I don't think the workaround is a fix. I am changing the status and category because this seems like a bug to me and I have made a patch for it.

This code is causing the problem:

$auth_conf = ldap_authentication_get_valid_conf();
if ($auth_conf && in_array($sid, array_keys($auth_conf->sids))) {
  // ...
}

Let's say you have a server called "myldap". It may or may not be active in the "Authentication" tab (checkbox).
If checked, the value of $auth_conf->sids["myldap"] is "myldap". If not checked, the value of $auth_conf->sids["myldap"] is 0.

I am attaching a patch which allowed me to delete my server. I changed one line of code to accomplish this.

$auth_conf = ldap_authentication_get_valid_conf();
if ($auth_conf && in_array($sid, array_keys($auth_conf->sids)) && !empty($auth_conf->sids[$sid])) {
  // ...
}
nullkernel’s picture

NWOM, your reroll looks good to me - I verified that I was able to clone the 7.x-2.x ldap branch and apply the re-roll to it. If you're satisfied with the change, I think we can change this status to RTBC?

NWOM’s picture

Status: Needs review » Reviewed & tested by the community

Yeah I think it's RTBC as well. Thanks a lot for your work on the patch.

  • grahl committed 52b8f96 on 7.x-2.x authored by NWOM
    Issue #2034923 by nullkernel, NWOM: LDAP Server: Can't still delete a...
grahl’s picture

Status: Reviewed & tested by the community » Fixed

Thanks

Status: Fixed » Closed (fixed)

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