bbPress 0.9 supports WP 3.0 cookies via Freshly Baked Cookies
I’ve just tested bbPress 0.9 with WP 3.0’s cookies and the Freshly Baked Cookies plugin DOES work properly.
Just make sure your cookie paths for WordPress and bbPress are pointing the same place (ie.
/) which was always required for proper integration anyway and is not done by the plugin but inside wp-config and bb-config – see the numerous integration guides around bbpress.org
Make certain you are using version 0.0.4 of the plugin or higher which supports the newer kind of WordPress cookies in use since WP 2.8
I am also in favor of using bbPress 0.9 as a standalone forum script rather than upcoming bbPress plugin.
Thanks for bringing this up!
That sounds great but after nearly 3 hours of attempting to get it working… I just feel too tired to keep trying.
I’ve set everything as per the instructions (cookiedomains, hashes, etc.).
Both WP and bbPress are generating cookies with the same names and same paths.
But by some unknown (to me) force they refuse to recognize each other’s cookies – when I log into one of them I get thrown out of the other.
It’s bbPress 0.9.6 with WP 2.9.2
Maybe I’ll try on clean installs tomorrow…
I just don’t have a clue what’s wrong
If your server uses a version of PHP less than 5.1.2 there is a possibility there is a slight incompatibility with the replacement hash_hmac between WP 3 and bbPress 0.9
PHP 5.1.2 or higher, that wouldn’t be the problem.
but since other people seem to have this working, let’s be sure…
phpinfo()tells me that PHP is Version 5.2.13
Now, pretend I am crazy and tripple check the settings at the top
The two keys and salts are the same. Keys I get from
wp-config.phpand salts from
take a REALLY good look at the cookie data – it changes between bbPress and WP but really only two parts should change, the expire date and the hash. So between the last | in the data
How the hash forms is still not quite clear to me, but obviously that’s where the issue lies. I notice that it’s different every time I log in (no matter from which side). I if log in/out of WP 10 times I get 10 different hashes. But maybe that’s the normal way.
Other things to note:
* I am using year long cookies plugin on the bbPress side
* bbPress has a trailing slash in these settings:
$bb->wp_siteurl = 'http://dev.example.net/';
$bb->wp_home = 'http://dev.example.net/';
whereas WP has them without the slash:
* as you can see I am doing this on a
devsubdomain and not on the live site. Even though I did test it on the live site(with the main domain) too and the result was the same
* the lines you mentioned in the plugin did not match: I had that code on lines 70 and 83
define('AUTH_COOKIE_VERSION', 2 );should be added at the top of
_freshly-baked-cookies.php, right? I did not exist there in the plugin download, so I added it before starting the tests
Thanks a lot for helping out
Oh wow. I’m an idiot.
Very sorry to put you through that – the version on bbpress.org is out of date!
It only does version 1, not version two.
I’ve just posted 0.0.4 which does version 2 (now set to default)
don’t forget to copy over the four define lines!
This is always updated faster than the copy in the plugin section.
I should really consider learning how to use subversion I’ll try that and post the result shortly.
Once you get that settled, I’ll point out how year-long-cookies never executes, even though you have it installed. So just delete that old plugin.
So to make longer cookies when “remember me” is set, you’d have to edit the freshly-baked-cookies plugin, search for the number
1209600and change it to
31536000which is a year. Optionally you could set it smaller like
111600which is 31 days.
Works flawlessly now. Great thanks for that neat plugin and for the support. I am also in favor of keeping lightweight standalone bbPress
- You must be logged in to reply to this topic.