Blogrimage 2013 Day 2: LDAP Server requires CTools
My day 1 patch was a quick fix to the LDAP module based on old notes from previous testing. For day 2, I really had to get back in and test the 2.x branch of the LDAP module. (I don't really plan to spend all 30 days of the blogrimage on this module, but it seems a good place to start.)
We've been running the 1.x branch of the LDAP module in production for nearly a year now, and haven't had any problem, but development on that branch was abandoned back in November, so we need to take steps to migrate to the 2.x branch.
I set up a new Drupal site exclusively for testing this module, and I didn't get very far before running into problems. I plugged in all the info for my LDAP server and immediately started getting debug messages telling me something was wrong. When I tried to test my configuration, the tests failed. After several minutes searching the issue queue, I found Issue #1882200, which stated that the LDAP Server requires another module, Chaos Tools, in order to work correctly. This would be easy to miss, since ctools is installed and running on almost every Drupal 7 site, anyway.
This was frustrating for a couple of reasons. One, if your module has dependencies, it's easy to list them in the .info file. Two, links in this issue led me to at least three different issues which may or may not be related, but all have similar symptoms. Several people, including the project lead, have posted workarounds, but nobody can track down the real source of the problem.
This simple dependency issue masks the larger one and makes diagnosis more difficult, so my patch for today was another simple one-liner, this time adding the ctools dependency to the ldap_server.info file.
I got a tweeted response to yesterday's post suggesting that I also take a look at the Simple LDAP module. I did, and it made me angry. This is the number one problem with Drupal contrib: multiple unfinished projects. Without going into specifics and pointing fingers, it looks like the developers of Simple LDAP made several contributions to the LDAP module, which will eventually be very powerful and feature-rich, then split off last October to make their own simple and streamlined module to do the same thing. This pattern is endemic in the Drupal community. I understand the need to balance features with getting things done, but it leads to fragmentation, especially in contrib space.