Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
A note on WordPress and cookie integration problems
Ziyphr
New
The WordPress integration tutorial is generally excellent and has been a great help. I'm sure many will have adopted Vanilla as a result. Don't worry about this unless you are experiencing trouble sharing a cookie across multiple directories..
I got everything working with the forum directory inside the blog, i.e. /blog/forum/ but I didn't want this for various reasons. When I moved the forum directory up to the same level as blog Vanilla wouldn't see the cookie, even though WordPress would. Changing the cookie path settings didn't seem to fix anything, perhaps because we created a custom authenticator.
To fix this I did 3 things:
1) Changed lines 184 and 185 in People.Class.WordpressAuthenticator.php to
$this->CookiePath = '/';
$this->SiteCookiePath = '/' ;
2) Comment out lines 34-37 in People.Class.WordpressAuthenticator.php to prevent error message on login.
3) I installed a simple plugin for WordPress that makes WP use a root cookie:
http://www.linickx.com/blog/archives/126/cookie-path-plugin-for-wordpress-20-root-cookie/
I hope other developers will find this useful.
0
This discussion has been closed.
Comments
The other day I upgraded WordPress and ran into some login problems. To fix these I loaded up wpsettings.php (in WP root) and found line 185.
Replace
if ( !defined('COOKIEPATH') ) define('COOKIEPATH', preg_replace('|https?://[^/]+|i', '', get_option('home') . '/' ) );
With
if ( !defined('COOKIEPATH') ) define('COOKIEPATH', '/' );
This should solve problems when logging in via WP, but my original post should fix problems when logging into Vanilla first. It's quite confusing but with cookies I've found most are getting defined to only work in a specific folder rather than your webroot. This is what both my changes fix.
Replace:
if ($CookiePath != $SiteCookiePath ) {
with:
if ($this->CookiePath != $this->SiteCookiePath ) {
Not certain this fixes your problem but it couldn't hurt.