I not only wanted to integrate my own other things into my WordPress-based site, but I wanted forums, too, so of course I thought of bbPress. It seems to integrate well with WordPress, but then suddenly strange things started happening with login and logout. For instance, when I logged in with bbPress, I couldn’t get WordPress to log me out and my integrated site didn’t work.
Ah-ha! A cookie problem–while I’d set the cookie domain for WordPress to allow subdomains to work, bbPress didn’t know about WordPress’s cookie settings, so bbPress didn’t set the right cookie domain. Worse, this meant that the cookie didn’t quite match up to what WordPress expected, so logging out in WordPress tried to blank a cookie that wasn’t set, not the login cookie set by bbPress. The fix is to add something like
$bb->cookiedomain = '.yoursite.com';
to bb-config.php (that is, match what you’ve set in WordPress). Not the most obvious way to set an option, but it works.
Comments 1
NOTE: if you’re trying to integrate bbPress 0.9.0.2 and WordPress 2.6 (or 2.6.1), the official advice is just don’t. You might also have a look at my newer post on the subject.