bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

[sticky]

WordPress + bbPress Integration 101

(125 posts)
  • Started 4 months ago by _ck_
  • Latest reply from _ck_
  • This topic is not a support question
  1. wiseacre
    Member

    What exactly means "WordPress + bbPress Integration"?
    * one users table in the DB
    *one users table in the DB and one login (you write user name and password once, and you are logged in the places)
    * or something else?

    Posted 3 months ago #
  2. This is what it is supposed to mean:


    *one users table in the DB and one login (you write
    name and password once, and you are logged in the places)

    Seems lots of people lately are having trouble with that. They idea behind integration is that you can log into either bbPress or WordPress, and you'll be logged in on the other side. The two installations appear "integrated", at least from a user login perspective.

    Posted 3 months ago #
  3. keress
    Member

    Chris wrote: "Using the same database is how the bbPress directions are written now; I think it's assumed. "

    I thought the installation instructions were vague on this point. It wasn't at all apparent to me which way I should go, and how o safely proceed with installing it into the wordpress database. A little editing could be very helpful to others in the future.

    Posted 3 months ago #
  4. Good point. If I could clarify the instructions, I would. We'll leave the information here 1) for others to see and 2) so the chiefs can see the difficulty some are having and clarify the instructions for all.

    Thanks.

    Posted 3 months ago #
  5. brianbrey
    Member

    I can not figure out where i went wrong.. I'm using the latest 1.0 alpha release at 2.6. Everything apperas to work as expected (users exist in both systems, etc). However, the auto login is not working. I believe i followed the instructions to the "T". Heres the stored cookie for both systems.

    Wordpress cookie after login:

    /r30ab08c19a56be384114b23c09751029b7cf0de2e632d894d28d72e65f7f9f4=paul%7C1219369085%7Cc34a82349db07b4910c7910f399a9524
    wordpress_=brian%7C1219369051%7Cf203245956a5b6a1e75d245128f85ced
    wordpress_test_cookie=WP+Cookie+check
    wordpress_logged_in_=brian%7C1219369051%7C3738545f5bdb765f9ba4f5696e435ff9
    wordpress_logged_in_57ff593b3dd6a2c72983ec37fa6fbe1a=paul%7C1219369085%7C6abf020fe1dc18102166be4e3a709ab1

    BBpress immediatly after logging into wordpress:

    /rwordpress_test_cookie=WP+Cookie+check
    wordpress_logged_in_=brian%7C1219369051%7C3738545f5bdb765f9ba4f5696e435ff9
    wordpress_logged_in_57ff593b3dd6a2c72983ec37fa6fbe1a=paul%7C1219369085%7C6abf020fe1dc18102166be4e3a709ab1

    BBpress (already logged into wordpress, now manually logging into BBPress:

    /rwordpress_test_cookie=WP+Cookie+check
    wordpress_logged_in_=brian%7C1219369051%7C3738545f5bdb765f9ba4f5696e435ff9
    wordpress_logged_in_57ff593b3dd6a2c72983ec37fa6fbe1a=brian%7C1219369533%7C9bc6a13aa1062a28d82bf0c30680253d

    any ideas?

    Cheers!

    Brian

    Posted 3 months ago #
  6. matthijs
    Member

    I've integrated the 1.0 alpha release of BBpress together with WP2.61 successfully in 2 places now. Works great so far.

    What I did: install wp in root the normal way. Then put bb files in subdirectory /forums/. Install bb. Follow instructions carefully. I also made my bb-config file writable, that prevented some errors as well.

    Posted 3 months ago #
  7. karlo
    Member

    I have a fresh installation of the latest release of Wordpress and integrating it with an installation of bbPress seems to be easy enough for a non-hacker like myself.

    But, how unstable is the 1.0 alpha of bbPress really? The site I'm working on is to be a soon-to-be-released homepage for a choir that will use it mainly for news, recruiting and general talk. Would you rather advice me to go for the wp 2.5.1 + bbPress 0.9 version?

    Posted 3 months ago #
  8. My advice would be to install it in a test instance and use it. See how unstable it is for yourself. Only you can make the determination if it's ready enough for you or not.

    Posted 3 months ago #
  9. karlo
    Member

    I guess I'll try then, "beta" is the new "stable" nowdays anyway, how bad could it get ^^

    EDIT: wp is installed in /blog, what is the recommended path for the bbPress in that case, if any?

    Posted 3 months ago #
  10. If beta is the new stable (thanks Google) then alpha is the new beta?

    In a test installation (just copy all your WordPress files and database) you can't really hurt anything. Just use it and see if it works enough for you.

    Posted 3 months ago #
  11. karlo
    Member

    Well, the installation (with full wp-integration) went as smooth as it could have, but the index.php doesn't want to load. Not even when fully referred to in the URL (/forums/index.php).

    My ftp-client sees the full installation and the content of the file seems to be ok. What settings could cause this error other than the URL actually not being valid, though I can't figure out why that should be? :P

    EDIT: I found that Firefox can open and read the readme.txt and licence.txt just fine, but it wont execute the php-files properly... this is just wierd?? What the heck did I miss here?

    Posted 3 months ago #
  12. karlo
    Member

    *couldn't edit my previous post anymore - hence the double*

    Hehe, I'm mighty proud now! I figured I'd check the config-files for both installation and see whether the information was matched or not (not having any idea what so ever if that could be the problem) and I found the different security-keys wasn't identical - so I fixed that.

    Now I have commenced mapping the role-maps and everything seems to be on track again. Thanks a lot for this guide and for making the systems compatible, saved me (well probably) an immense amount of time!

    Posted 3 months ago #
  13. karlo
    Member

    I've been trying to install and integrate wp 2.5.1 and bbPress 0.9 a couple of times to have both cookie- and userdata integrated, but after removing all databases and configfiles two times in a row and reinstalling I still get this error in my bbPress-installation:

    Duplicate key name 'user_nicename'
    >>> User tables will already exist when performing a database integrated installation.

    What causes this error?

    Posted 3 months ago #
  14. I'm trying to integrate with a WP 2.5.1 install and my wp-config.php does not include a constant named "SECRET_KEY". The install routine will not let me complete without that. I'm stuck.

    Posted 3 months ago #
  15. The wp-config-sample.php for WordPress 2.5.1 most DEFINITELY has that constant (line 13). Maybe you upgraded and used an old wp-config.php. You would never see the new constants unless you updated a wp-config-sample.php with your old database details.

    // Change SECRET_KEY to a unique phrase.  You won't have to remember it later,
    // so make it long and complicated.  You can visit http://api.wordpress.org/secret-key/1.0/
    // to get a secret key generated for you, or just make something up.
    define('SECRET_KEY', 'put your unique phrase here'); // Change this to a unique phrase.
    Posted 3 months ago #
  16. This is my installation structure
    |--mydomain.com\wordpress\bbpress

    I am using WP 2.5.1. and bbpress 0.9

    1) Can someone please elaborate steps 3, 4, 5? They're very vague.
    2) What do I do about cookies if my structure is like above?

    I pasted:
    define('COOKIE_DOMAIN', '');
    define('COOKIEPATH', '/wordpress/');

    per the instructions listed in "settings -> Wordpress Integration"

    How do I know if the cookies are working correctly?

    I have the other steps down correctly. I simply got lost at 3,4,5 and don't know what to paste in my wp-config.php.

    Any other tips will also be helpful. Thanks.

    newb

    Posted 2 months ago #
  17. [gives up]

    bring on the docs

    Posted 2 months ago #
  18. Though I hesitate to say this out loud, it is possible to integrate bbPress 0.9.0.2 with WordPress 2.6.x (I have a site running the two and logins to one part work in the other, cookies are properly set and cleaned up, etc.), BUT it requires plugins to both bbPress and WordPress (or, alternately, modification of core code) and I'd venture to guess that it might substantially weaken the cookie security introduced in WP2.6. If anyone is desperately interested, I can share details, but it's messy.

    Posted 2 months ago #
  19. I experimented for awhile with making a plugin that would make 2.6 work with the 2.5 cookies using a pluggable replacement but the task proved overwhelming. Then I tried making a replacement pluggable for bbPress to make it work with 2.6 cookies and that was just as insane too.

    Unless your mods are concentrated into one file I wouldn't recommend tampering with the core.

    I don't get the rush to WP 2.6 It's getting terribly bloated.
    I miss 2.0 - feature rich yet still lightweight.

    Posted 2 months ago #
  20. bbll
    Member

    Got integration working under WP 2.5.1 and bbpress 0.9.0.2

    I'd just like to make an observation regarding integration instructions for power users -
    Instruction part 8 says: Copy all these items into the bottom of wp-config.php and edit as required:

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

    Originally, I took this to mean:
    $wp->cookiedomain = '.mysite.com';
    define(COOKIE_DOMAIN,'.mysite.com');

    It wasn't working. However, once I changed it to:
    $wp->cookiedomain = '.www.mysite.com';
    define(COOKIE_DOMAIN,'.www.mysite.com');

    and in bb-config.php:
    $bb->cookiedomain = '.www.mysite.com';

    (adding the www part) It works perfectly fine now.

    Hope this helps.

    Posted 2 months ago #
  21. ".mysite.com" should cover all subdomains.
    Techincally .www.mysite.com is a subdomain.
    I don't know why it didn't work for you
    unless perhaps it was already ".www.mysite.com" on the WP side. They have to match.

    Posted 2 months ago #
  22. doyle640
    Member

    I successfully integrated bbpress alpha with the latest wordpress. The install is pretty flawless.

    Now, I want to pull in the header and sidebar from wordpress. Does anyone have any tips for me on how to do this?

    Posted 2 months ago #
  23. To use the WordPress functions get_sidebar and get_header, you need to include WordPress inside bbPress:
    http://bbpress.org/documentation/integration-with-wordpress/#func

    This might help as well:
    http://www.adityanaik.com/integratepress-part-i/

    Posted 2 months ago #
  24. doyle640
    Member

    that works, however, i can no longer access the admin section, it only loads as blank, any ideas why? thanks for your help with this.

    the rest of the functions work on the main pages of the forum.

    Posted 2 months ago #
  25. @ck:

    based on my recollections, as i'm on a road trip and can't readily pull up the code, WP2.6 (maybe older, too, i don't know), in the midst of their new cookies, has an action hook that can be tapped at cookie-creation to make an additional cookie for bbPress to read (in my instance, bbPress is in /forums/ so the new cookie is restricted to that path). the function that destroys the cookies at logout doesn't have an action hook, so it has to be overridden (it's pluggable). on the bbPress end, it's virtually identical--use an action hook at login to create the various cookies that WP expects, override the pluggable cookie-destroying function.

    there's also some work in syncing up all the various secrets.

    it's worth noting that the cookie that's now restricted to wp-admin/ in WP2.6.x is the same cookie that was unrestricted in path previously, so the mechanics of the cookie contents and whatnot aren't any different, just the path restrictions.

    Posted 2 months ago #
  26. doyle640
    Member

    Does anyone know why the admin section is displaying blank when the wordpress functions are included in bbpress?

    Posted 2 months ago #
  27. If the browser is blank when you load a page, it's probably due to a 500 error. Do you have access to error logs to see what's causing that error? I have not hear of that before when including WordPress in bbPress.

    Posted 2 months ago #
  28. Nekita
    Member

    Seems as if I have the same problem as doyle640. Integrated the Alpha with WP 2.6.2 and after adding "require_once('../wp-blog-header.php');" to bb-config.php I can't access the bbP Admin section anymore. the "Reply" and "New Topic" area is gone as well, Profile can't be edited etc. The title under my Admin name ("Key Master" by default) will also change to Invalid.

    The loading error for the admin section is indeed a 500 error. At first I figured it might be related to some class conflicts within the WP and bbP CSS structure but fiddling with that didn't help either.
    Now it seems more likely that the User Account looses all of it's user privileges in bbP once it's integrated with WP for some reason.

    Posted 2 months ago #
  29. doyle640
    Member

    here is my errors when I try to access the bbpress admin section:

    [15-Sep-2008 12:10:48] PHP Warning: require_once(../wp-config.php) [function.require-once]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/forum/bb-config.php on line 34
    [15-Sep-2008 12:10:48] PHP Fatal error: require_once() [function.require]: Failed opening required '../wp-config.php' (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /Applications/MAMP/htdocs/forum/bb-config.php on line 34

    On the regular part of the forum, I do not get these errors.

    Posted 2 months ago #
  30. Is the wp-config.php actually located at ../ ?

    Also, you could try the absolute path rather than a relative one. I have heard before that that might be a problem (although I've never seen that. I don't use MAMP though.)

    First verify if the wp-config.php is located ../ from bb-config.php. If it is, try the full absolute path rather than a relative one. Something like /Applications/MAMP/htdocs/wp-config.php.

    Posted 2 months ago #

RSS feed for this topic

Reply »

You must log in to post.

Code is Poetry.