Forum Replies Created
In reply to: Just one more… release candidate 1.0-RC-3In reply to: i wana convert my phpbb 3.0.5 forum to bbpress 0.9.5
onel0ve, I converted a phpbb2 forum to bbpress 1.0a6 awhile back and it was quite a bit of work. You’ll need to export the entire db, then figure out which forum/topic/post ids correlate between phpbb3 and bbpress. The easiest way I found to rebuild the db in bbpress is to write some regexes that take the exported phpbb3 forum data and format it into correct sql statements to preserve the old id associations between posts/topics etc. Of course, phpbb3 and bbpress 0.9.5 are probably totally different from phpbb2 and bbpress1.0 in terms of db table format, but I remember having to combine data from several phpbb2 tables into single bbpress tables to accomplish the task. Make sure you have a test environment to build the new bbpress db on as you’ll probably need to give it a few tries and test out a few things before attempting to rebuild the entire thing.
Unless you own your server, you’ll also want to be sure to do the actual regexing (if you decide to run it in a php script for example) on your own computer (XAMPP or LAMP), because if your forums are large, that is quite a load on the server to run the regex routines that format your sql insert statements (and your hosts may not be too happy about that). I also ended up having to split up my data into several files to get it to work with a php regex.
Please excuse my previous longwindedness as it seems it was unnecessary. I just tested a site with WP in the base folder and bbP in a subfolder of WP, and a site with WP in a subfolder of the base folder with bbP in a subfolder of WP. Neither site needs anything added to either config file except that the 3 secret keys match between them (my nonce keys also match but that shouldn’t matter). It is also necessary to fill in the wp-admin’s bbPress Integration Plugin settings, and the bb-admin’s WordPress Integration settings.
On any sites I’ve tested where I have WP in a subfolder of the base folder, and bbP in a subfolder of the WP folder, bbP sets 2 logged_in cookies, one with a trailing / and one without, which poses a problem since WP doesn’t get rid of the one without a trailing / and thus WP cannot logout from bbP if the user logs in from bbP. After I made the change mentioned above to bb-settings.php and tested it on both sites mentioned I found both sites integrating as expected and the double logged_in cookie from bbP login was no longer a problem. That’s why I submitted the patch to Trac.
Do you have WP in a subfolder of your main site? Do you have bbP in a subfolder of WP? Are you 100% certain that you can log in from bbP and then logout from WP, and that you actually get logged out from both when you try that order? I think the easiest way to stop all these integration headaches is to put up a document with a dummy wp-config.php and bb-config.php that have been tested in the situation mentioned and in the situation where WP is the base site folder and bbP is a subfolder of the base.
Everything but that order of action works fine for me without adding anything to bb-config and without adding anything but cookiepath to wp-config. However, every way I tried to line up the configs I’d always get that second logged_in cookie without a trailing / when logging in from bbP and WP won’t get rid of it.
Looking in the bb-settings.php I see that cookiepath always gets a trailing / added on and sitecookiepath always gets the trailing / trimmed, so the check to see if they both exist and are the same, never returns true, and thus bbP always sets 2 logged_in cookies.
Ok arturo84, make the changes Sam suggested by dropping the www from your cookie domain settings in each config, then put the Integration plugin code back into wp-config. In wp-config the Integration plugin recommends the following settings among others:
change SITECOOKIEPATH to match COOKIEPATH like this:
Then for the bb-config you should include the recommended integration speedups from the bottom of your bb-admin/options-wordpress.php page, and make sure that the cookiedomain doesn’t have www, and that both cookiepath and sitecookiepath are / as well:
$bb->cookiepath = '/';
$bb->sitecookiepath = '/';
Then go into bb-settings.php (in the base bbpress folder). Look to line 768 if you have rc-2. Change line 768 from:
$bb->sitecookiepath = rtrim( trim( $bb->sitecookiepath ), " tnrx0B/" );
$bb->sitecookiepath = rtrim( trim( $bb->sitecookiepath ), " tnrx0B" );
$_bb_sitecookiepath = rtrim( trim( $bb->sitecookiepath ), " tnrx0B/" );
Notice the removed / before the ” and that you need to add the second variable below it as that variable is used to set the other cookie paths.
Upload the altered bb-settings.php over your current one and it should fix the problem. Please come back and let us know if it works for you too
Ok I think I found a fix for this and I’m submitting a patch to trac now
This gave me a couple ideas to fix both our problems. Changing
define('COOKIEPATH', '...');fixed half of my problem (in other words, removing the wp-admin from the end of SITECOOKIEPATH, since I noticed that having it there sets a cookie with a Path like /yawp/wp-adminwp-admin), I can at least include the Integration plugin’s suggested settings in wp-config now. But I still get a second logged_in cookie when logging into the bbp side, that logging out from WP cannot remove. IE, /yawp/ and /yawp for the Path:
I haven’t figured out how to make bbP stop giving the second cookie without the trailing / but at least it now removes the one with the trailing / when logging out from WP (WP still thinks it is logged in due to the non-trailing slash cookie and shows the site admin link in meta, but won’t allow me re-enter the admin after logging out. At that point it acts as the situation arturo84 describes as his original problem, but also fails to logout from the bbp side)!In reply to: Final release candidate 1.0-RC-2 is available.
Sam, I’ve tried about 50 different changes and no matter what I do with the config files, the Integration plugin settings, or the bbPress WordPress Integration settings, nothing seems to change the fact that I cannot logout from WordPress if I have logged in from bbPress (that means I cannot logout period, I click logout there and can still go into either of the admins because the cookies are not removed). Everything else works fine. I could always redirect all my bbP login forms to wp-login.php I suppose, but it seems like that should be unnecessary. Could it be because my wordpress is in a subfolder of my site like /public_html/yawp/ ?
It seems when I login from bbP I get 2 wordpress_logged_in_* cookies, with identical values except that the ‘Path:’ of one is ‘/yawp/’ and the ‘Path:’ of the other is ‘/yawp’. When I login from WP I only get 1 wordpress_logged_in_* cookie, and it has a ‘Path:’ of ‘/yawp/’. I feel like this might be part of the problem.
I figured the integration speedup line
$bb->sitecookiepath = '/yawp';in bb-config.php might be to blame and added only that line, but changed it to
$bb->sitecookiepath = '/yawp/';, cleared cache, deleted cookies, but still I get both logged_in cookies when logging in from bbP. That’s among trying a bunch of other different config changes to get that wp_login_* cookie unified.
Since you said in the RC-1 thread that I should be able to have this work if I just play with the cookie paths, have you any suggestions?
There’s no secret to it. All the info you need is in these forums. You mostly need to make sure that the […] in the following:
between your wp-config.php and bb-config.php.
Make sure you use different table prefixes for WP and bbP.
bb-config.php shouldn’t have anything extra defined in it past that, if you had left in WP2.8. Since you downgraded to 2.7 your bb-config.php needs to have
define('WP_AUTH_COOKIE_VERSION', 1);until you upgrade back to 2.8, at which point you need to remove that line again.
Your wp-config.php needs to have
define('COOKIEPATH', '/wordpress/');where ‘wordpress’ is the path to wherever you installed WP, or
define('COOKIEPATH', '/');if WP is in your site’s base folder.
Visit the WP administration settings and fill out the bbPress Integration Plugin settings (but mind what I said above, you probably shouldn’t add what it suggests adding to your wp-config.php file).
Visit the bbP administration settings and fill out the WordPress Integration settings there as well.
As I said in the posts I linked earlier, everything works fine for me with WP2.8-RC1 or any of the betas, and bbP1.0-RC1, except that if users log in from bbP, they can’t log out from WP (which seems a somewhat trivial issue since I doubt many users will need to do that).
Hope you can get it working.
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~In reply to: bbPress 1.0 Release Candidate 1
Yesterday I updated a public site with a relatively inactive and fresh bbP forum from WP2.7.x and bbP1.0alpha-6 with the bbPress Integration 1.0-alpha-4.1 plugin…
to WP2.8-beta2-11509 and bbP1.0-rc-1 with the bbPress Integration 1.0-rc-2 plugin.
I haven’t done extensive testing, but the integration worked flawlessly before the upgrade (following Sam’s video tutorial sticky to the letter), and seems to work almost as well now.
The one scenario I’ve found where it doesn’t work is users logging in from bbP cannot logout from WP. All other bbP/WP login/logout combinations seem to behave as expected; however the only way I could get this to happen was to not add the wp-config.php changes suggested by the bbPress Integration plugin. When I did add those changes it broke at least WP login entirely.
I did a little bit of testing with different combinations of the definitions the bbPress Integration plugin suggests, and the details can be found in this post.
peace~In reply to: bbPress RC1 with WordPress 2.8 shared login
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:
/* That's all, stop editing! Happy blogging. */
'/'might be a
And here is the bottom of bb-config.php:
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.