Navigate/Search

Archive for October, 2007

WPMU-LDAP: WPMU 1.3rc2 Compatibility

Thursday, October 18th, 2007

I spent some time today hacking away at the most recent revision of the WPMU code from SVN… the bleeding edge (at the time, anyway) revision of 1101. I was in the process of starting to evaluate the WPMU 1.3 release candidate, and to try to get it working with the LDAP plugin. This was to hopefully nip any issues (like this one) in the bud before WPMU 1.3 is released.

Fortunately, it worked beautifully, and it looks like getting the plugin to work with WPMU 1.3 won’t even require any core hacks any more. We won’t have to maintain a hacked copy of pluggable.php anymore! :) There are also some other cool features with WPMU 1.3 that I’m looking forward to, because it will let us simplify the code a bit… it should be a good release.

A couple people have recently expressed interest or submitted code for the plugin, so it’s nice to be able to start thinking about the plugin with support from others. One developer in particular has been working on doing Authorization with the plugin..! I’d really like to include this sort of functionality in a 2.0 release, as I think that most users of the plugin would like to centralize their management of user roles for blogs. Things like department announcement blogs become a lot easier if this was set up…

Wistful thinking. But I would like to take a serious look at the plugin’s glue code, to make it more than just a proxy account creator…

*internal gears turning* hmmm… I already have some other ideas for v2.0. :)

-sean

WPMU-LDAP: WPMU 1.2.5a Incompatibility

Friday, October 12th, 2007

After a hiatus, I return! … with less-than-stellar news.

The WPMU-LDAP Authentication plugin is, unfortunately, incompatible with WPMU 1.2.5a. I haven’t spent time with WPMU recently, so I missed the release of the new version.

The plugin architecture changed (accidentally, apparently), and so the LDAP Auth plugin no longer can employ the fairly trivial hack to /mu-plugins/pluggable.php it used before. The text of the original news at our SourceForge project is here:

As most people probably know at this point, WPMU 1.2.5a is *incompatible* with the LDAP Authentication plugin. This is unfortunate, but hopefully we’ll be able to address the issue soon.

For the technically minded:
The problem lies in changes made to WPMU in its plugin architecture, specifically with the removal of the mu-plugins.php/pluggable.php file. The code for that was merged into wp-includes/wpmu-functions.php, which causes problems with overriding the wp_login method. I’ve entered a ticket to address this, hopefully, into Trac for WPMU. You can see it here: http://trac.mu.wordpress.org/ticket/439. If you’re at all interested in this project, and want to continue using LDAP Authentication (without lots and lots of core hacks), please consider posting a comment in support of the change requested by the ticket.

Fortunately, donncha was quick to respond with a fix, and I wrote an update news item at SF.net:

There’s been an update. Donncha has restored the pluggable.php code with the recent merge of WP 2.3 code. So the next release should fix things. See http://trac.mu.wordpress.org/changeset/1069.

If you’d like to use this plugin with WPMU 1.2.5a, then you will need to employ a hack to wpmu-functions.php to extract the pluggable.php code.

I wish it were done in a separate, pre-WP 2.3 checkin, so that we could just update to that version, but alas, it was not meant to be.

I think the hack to get everything working again is still pretty trivial, we just now have two core hacks to make the plugin work with WPMU.

  1. Modify /wp-includes/wpmu-functions.php to remove the code that was previously in pluggable.php. That’s lines 1862 through 2017.
  2. Recreate pluggable.php as it is packaged with this plugin.

I need to test it out, but I’m pretty sure that this will work.

-sean