Skip to:
Content
Pages
Categories
Search
Top
Bottom

bbPress RC1 with WordPress 2.8 shared login

  • Hi all,

    Just wondering if anyone has a shared login working with bbPress RC1 & WordPress 2.8 beta?

    I have WordPress installed at root level and bbPress in a sub directory using the WordPress users table.

    When setting up bbPress I went through all the integration settings.

    Now users can log in at either end no problem, it’s just that they are not logged in on the other end when visiting the forum/wordpress.

    I then regenerated the keys using http://api.wordpress.org/secret-key/1.1/ and placed these in both config files with the required BB_ bit for the bbPress config.

    I added the following to my bbPress config:

    $bb->wp_siteurl = 'http://site.com/';
    // that's your WordPress URL, not bbPress

    $bb->wp_home = 'http://site.com/';
    // almost always the same as siteurl unless you tinker

    $bb->wp_table_prefix = 'wp_';
    // should almost always be wp_ unless you tinkered

    $bb->user_bbdb_name = 'xxxx';
    // this is the MYSQL database name for *WordPress*
    // you can copy it right out of WordPress !

    $bb->user_bbdb_user = 'xxxx';
    // this is the MYSQL user name for *WordPress*
    // you can copy it right out of WordPress !

    $bb->user_bbdb_password = 'xxxx';
    // this is the MYSQL password for *WordPress*
    // you can copy it right out of WordPress !

    $bb->user_bbdb_host = 'localhost';
    // 99.9% of the time it's going to be localhost, unless you are on DreamHost or some other weird ISP

    $bb->custom_user_table = 'wp_users';
    // 99.9% of the time it's going to be wp_users

    $bb->custom_user_meta_table = 'wp_usermeta';
    // 99.9% of the time it's going to be wp_usermeta

    $bb->authcookie = 'auth code i set with wp plugin';
    // in theory you should be able to leave this out
    // but this is going to be copied from WordPress cookie
    // this *must* match the WordPress setting
    // do NOT use the 1234567 part, use your own cookiehash from WordPress - see the note at the very bottom

    $bb->cookiedomain = '.site.com';
    // note the leading DOT - this is important
    // this *must* match the WordPress setting

    $bb->cookiepath = '/';
    // I *highly* recommend you set the cookie path to /
    // this *must* match the WordPress setting

    $bb->sitecookiepath = '/';
    // I *highly* recommend you set the cookie path to /
    // this *must* match the WordPress setting

    $wp->cookiedomain = '.site.com';
    define(COOKIE_DOMAIN,'.site.com');
    // note the leading DOT - this is important
    // we list both for WordPress legacy compatibility

    $wp->cookiepath = '/';
    $wp->sitecookiepath = '/';
    define('COOKIEPATH', '/' );
    define('SITECOOKIEPATH', '/');
    // I *highly* recommend you set the cookie path to /

    Now when I log in at the bbPress side, a wordpress_logged_in_xxxxx cookie is created but then when I visit the wordpress end, I am not logged in.

    When I do then log in on the WP end, it creates another wordpress_logged_in_xxxxx cookie, the cookie names are both the exact same but their values are different.

    Anybody got any tips on how to fix this?

Viewing 1 replies (of 1 total)

  • ty
    Member

    @junsuijin

    I just upgraded a public site from the latest WP2.7.x to the latest WP2.8-beta2 and decided to upgrade the site’s bbP1.0alpha6 and the bbP Integration plugin that was made for that version (all working as expected).

    I was having similar problems with wp2.8-beta2-11509 and bbp1.0-rc-1, using the bbPress Integration 1.0-rc-2 plugin. I found that adding it’s suggested changes to my wp-config.php was causing the problems. I also removed the integration speedups suggested from the bbP admin ‘WordPress Integration’ settings. Now I haven’t tested registration from the bbPress end, but everything else seems to work back and forth. Here’s what I have near the bottom of wp-config.php with everything working:

    define('WPLANG', '');
    define('COOKIEPATH', '/');

    /* That's all, stop editing! Happy blogging. */

    Where the '/' might be a '/subfolder/'

    And here is the bottom of bb-config.php:

    define('BB_LANG', '');
    ?>

    The only thing I’ve found not working thus far is users logging in from the bbP side cannot log out from the WP side. Everything else seems integrated for logins/logouts (login/out from WP, login from WP/out from bbP, login/out from bbP).

    This is a minor issue compared to not being able to login to WP at all when using the suggested bbP integration changes to wp-config. I also have all 4 random keys matching between configs, including the nonces (which I don’t think were mentioned in the integration video post, but I don’t remember now). I hope there’s a fix for the login from bbP/logout from WP in the next release of the Integration Plugin, and I also hope that the issue doesn’t affect registration from bbP (since it seems to be related to the plugin). Great work on this so far Sam :)

    On a side note, further testing suggested that it was the ‘SITECOOKIEPATH’ definition causing the inability to login from WP, and the ‘COOKIEHASH’ definition seems to allow WP login, but break the integration.

    peace~

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.