Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbP/WP integration – same userbase, but logging into 1 logs you out of the other


  • arandomdan
    Member

    @arandomdan

    I’m running WP 2.7.1 and bbPress Version 1.0-rc-1 on localhost. WP has been installed to /3dd/ and I installed bbPress to /3dd/bbpress/ today and have done all the proper steps for syncing in the bbPress admin.

    I have added the following code to bb-config.php:

    require(BB_PATH . '../wp-blog-header.php');<br />
    define('WP_AUTH_COOKIE_VERSION', 1);<br />
    $bb->bb_xmlrpc_allow_user_switching = true;

    I can login to both WP and bbPress with my WP user account (yay!), but <b>the problem is that WP doesn’t know when I logged in to bbPress and vice versa</b> (i.e. when I am logged into WP, bbPress still shows the login form). In addition, <b>when I login to bbPress, WP logs me out; and when I login to WP, I am no longer logged in on bbPress</b>. I have cleared my cookies many times and tried it in both IE and Firefox, same result.

    Together, WP and bbPress create the following cookies (aside from the wp-settings and test cookies):

    Domain                  Cookie name<br />
    /3dd/ wordpress_logged_in_*<br />
    /3dd/wp-admin wordpress_*<br />
    /3dd/wp-content/plugins wordpress_*<br />
    /3dd/bbpress/bb-admin wordpress_*<br />
    /3dd/bbpress/bb-plugins wordpress_*<br />
    /3dd/bbpress/my-plugins wordpress_*<br />
    /3dd wordpress_logged_in_*<br />

    I believe the last 4 are created by bbPress and it should be noted that there is no trailing slash on the wordpress_logged_in_* cookie path.

    Does anyone know what the problem might be?

Viewing 1 replies (of 1 total)

  • ty
    Member

    @junsuijin

    You should only need the define('WP_AUTH_COOKIE_VERSION', 1); part added to the bb-config.php, not the rest (if you upgrade to WP2.8, then you don’t need any of those additions to the bb-config.php file). The WP bbPress Integration plugin’s settings page lists some things you’ll need to add to your wp-config.php file though. Namely, you’ll need to add at least something like define('COOKIEPATH', '/');, depending on your wordpress’ installation path. Try just adding that part and see how things work. If they don’t work, try adding the other things the WP bbPress Integration Plugin settings page suggests (I added all of it’s suggestions using the latest WP2.8 and the latest bbPress 1.0-rc-1 and it broke my WP login; but with just the cookipath definition, most everything except logging in from bbP and then logging out from WP [somewhat trivial], integrates as expected).

    peace~

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.