Info
- 192 posts
- 74 voices
- Started 3 years ago by _ck_
- Latest reply from kevinjohngallagher
- This topic is not a support question
WordPress + bbPress Integration 101
-
- Posted 3 years ago #
In my case, yes, the relative path works just fine, given that I have access to my WP scheme files after I utilize it.
However, I just found out that adding:
if (file_exists('../wp-blog-header.php'))
require_once('../wp-blog-header.php');instead of just
require_once('../wp-blog-header.php');
does the trick, at least to get access to the admin area.
I'm still stuck with the limitation of my admin account though. Once it's integrated and I log on the bbP, I can't write a post nor reply or edit my own profile because the admin user receives the status "Inactive".
-
- Posted 3 years ago #
To give you an idea of what I'm talking about:
http://chocolatebydeath.com/forum/
User: Rauko
PW: IIlCuxOmYRpnThis is a test user I just registered. Once you log in with this data, you'll see that this account is extremely restricted for whatever reason. It's the same with my own admin account and other user accounts.
-
- Posted 3 years ago #
Nekita - the reason that works is because it's not including the wp-blog-header.php (can't find it), but it doesn't error out because you're saying "if it's there, then include it": otherwise, just continue on, but it's not included.
So, it errors out when you don't have the conditional, but with the conditional there, do you have access to WordPress functions, or you can just access specific theme files? Accessing the theme files would not require integration. But using the functions like get_header, get_sidebar, get_footer would all rely on integration being correct.
This assumes that the errors are the same as doyle640:
PHP Fatal error: require_once() [function.require]:
Failed opening required '../wp-config.php'
-
- Posted 3 years ago #
I'm using the functions get_header and get_footer in my front-page.php etc. and it's working just fine as you can see on my site.
-
- Posted 3 years ago #
Hmm - that makes no sense to me. What is the exact error you get if you do not include the
if (file_existsstatement? -
- Posted 3 years ago #
Chris,
thanks for your reply. You are right, there's not much general sense in that problem to begin with.
Unfortunately the issue already starts with the use of a relative vs. an absolute path because the absolute variant isn't even recognized. The only two options available seem to be either the relative take withrequire_once('../wp-blog-header.php');
or something that could be called absolute, but is pretty inconvenient to use:
define('WPPATH', dirname(dirname(__FILE__)) . '/');
require_once(WPPATH . 'wp-blog-header.php');Both of these result in the availability of WP commands like get_header etc. which would be needed to visually integrate bbP with WP, but with the major problem that all my accounts in bbP are Inactive for some weird reason.
Every other attempt where the path to wp-blog-header.php would really be false would just result in the forum link to not work any longer. Therefore it does seem much more likely that different elements of bbP are more or less able to deal with this way of WP integration or access to that file. I would love to give you more detailed error information about the 500 error but I'm not sure where to aquire it.Furthermore, that problem with Inactive accounts doesn't seem to be entirely new. I did some research via google and it does pop up every now and then, here's an example even from way back in 2006: http://comox.textdrive.com/pipermail/bbdev/2006-September/000719.html
> > > There is an issue with posting: > > > bbpress shows the users (admin) as Inactive. This lets me login, but > > > I cannot post since the post form is hidden. > > > > You must have integrated an old bbPress install with WP (that is, you > > must have run the bbPress install script before integrating the > > two). If that's the case, none of your bbPress users exist anymore > > (they're not defined in WP's user table), and your admin account is > > inactive. To fix your admin account, you'll have to change the usermeta > > > > bb_capabilities = a:1:{s:8:"inactive";b:1;} > > > > to > > > > bb_capabilities = a:1:{s:9:"keymaster";b:1;} > > > > for your admin account. (Where 'bb_' is your $bb_table_prefix.)Unfortunately the usermeta in my database is already set as a:1:{s:9:"keymaster";b:1;}, but it's still acting as if users are inactive.
It really is pretty tiresome and after many many database restores and bbP reinstalls I come to the conclusion that integration of WP Functions is somewhat poorly treated so far.For now my best bet seems to be to either try and replicate my WP scheme within bbP which would take a lot of double work and maintenance when I apply changes to my blog or go with a different forum solution altogether. : /
-
- Posted 3 years ago #
The absolute path works completely, I don't understand why, but it does.
Thank you so much.
-
- Posted 3 years ago #
By the way, i am also having the problem with the some of the forms, like the reply forms, disappearing. No html is posted whatsoever. I haven't looked into it thoroughly yet though.
-
- Posted 3 years ago #
The essence of this is that it screws with the usermeta data in the database once you try and integrate WP functions, up to a point where even your admin account for WP doesn't work anymore.
Here's an example:
Variant1:
1. Upload bbP to the Server
2. Change the bb-config.php including the require_once line
3. Run the Installer
4. After Installation is finished you can't log on to your WP admin anymore because the admin user suddenly has insufficient access rights, requiring a database restore.Variant 2:
1. Upload bbP to the Server
2. Change the bb-config.php excluding the require_once line
3. Run the Installer
4. Add the require_once line after installation is finished
5. Your WP admin account is still working as it should and you can even use it for bbP, but with the Inactive user status.Doesn't make much sense, does it?
-
- Posted 3 years ago #
@Nekita
Don't modify your bb-config file until after you have installed bbPress.
Even then I can't guarantee it will work with Trunk as it isn't tested for deep integration yet.
-
- Posted 3 years ago #
Hello Sam,
yes I thought as much, but I had a database backup ready so it's all good.
So is it safe to assume that one is better adviced to wait with deeper integration until 1.0 or a stable beta is released?
Thanks
Lars -
- Posted 3 years ago #
I just wanted to add that I am having the same issue as Nekita....I was able to get everything integrated outside of the fact that BBpress does not recognize any user other than Inactive. That seems to be the only issue at this point, but one that stops the whole integration from working.....
-
- Posted 3 years ago #
Yeah it's an extremely annoying issue, especially because everything else seems fine and suddenly you're just stuck.
It's good to see though that I'm not the only one with this problem. I have my hopes up that this will be solved with the Beta. The development hub looks very promising. -
- Posted 3 years ago #
Yeah for sure. Big pain. I saw that you submitted a ticket, so hopefully they will fix that soon and we can even get rolling with the alpha install. In the meantime I am downgrading to make it work.
-
- Posted 3 years ago #
Good nice.
wordpress 2.6 + bbP 0.9.0.2
Is that OK? -
- Posted 3 years ago #
That won't work for cookie and user integration.
-
- Posted 3 years ago #
I'm having some trouble and am smacking my head against the wall... I hope someone can help me.
I've got WordPress 2.6.2 installed at http://www.blahblah.com/
and bbPress 1.0 alpha at http://www.blahblah.com/forumThey are in two databases sharing the user tables.
My problem is that the user must Log OUT from the site that he/she logged IN from. If they logged in at the bbPress login form, then they will be logged in properly on the wordpress site, but if they try to logout there, they will get kicked back to the main page, but STILL BE LOGGED IN. They will only be able to properly log out from bbPress. And the same is true in reverse -- if they login from wordpress, they will be logged to the bbPress too, but they will have to log out from wordpress.
A second, less severe problem, but maybe it will help point to the reason for the above problem, is that if i sign in on wordpress, I will not be able to access the admin panel on the bbpress. I will be logged in as admin, and can perform admin functions on the site, but I cannot go to /bb-admin -- I get kicked back out. However, if I sign in on bbPress, I CAN access my wordpress admin section.
Any ideas? My wp-config and bb-config files have the definitions for SECRET_KEY, AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY (with BB_ prefixed for the bb-config ones).
They also both have
define('COOKIE_DOMAIN', '.blahblah.com');
define('COOKIEPATH', '/');Is this correct? It should be the same for both?
One thing that might be the root of the problem, or at least I was not sure about, is the setting for "WordPress "secure auth" cookie salt " in the WordPress integration settings in bbPress. I have left this blank because I have no such entry on my options.php page in WordPress. I did fill in the other two "salt" items, though. I confess that I don't really understand what this salt stuff is for, but any advice would be appreciated.
I'm on 1&1 hosting, if that makes any difference.
-
- Posted 3 years ago #
In addition to the info in the previous post, I've looked at the cookies themselves.
I see that when I log in through bbpress, the cookies are from http://www.blahblah.com. When I log in through wordpress, it's just blahblah.com (no www prefix). Under the configuration for both sites, http://www.blahblah.com is set as the main page. I also see that wordpress puts four cookies, while bbpress puts six. They both put wordpress_test_cookie and wordpress_logged_in_xxxxxxxxxxxx
but wordpress puts just two other ones, named wordpress_xxxxxxxxxxxxxx with the paths
/wp-content/plugins and /wp-adminWhile bbpress also includes the bb-press directories. Is this why a login through wordpress does not get me access to the bbpress admin?
-
- Posted 3 years ago #
Something I could not find in this or any other thread concerning integration of 0.9.0.2 with wp 2.5. Problem is that a login to either bbPress or WordPress will log a user OUT of the other, can not be logged into both at same time. Common problem but different question. Several people have suggested adding the following to the bb-config.php:
$bb->usercookie = 'wordpressuser';
$bb->passcookie = 'wordpresspass';Questions: are these really needed, should the full hash number (wordpressuser_full.hash.number) also be included and if so, where do I find the hash code? Using Firefox, the I see two cookies when logged into either bb or wp:
wordpress_test_cookie
wordpress_cabxxxxxxxxxxxxThe Secret keys are identical for both bb and wp config files. Also I have:
In bb-config file:
$bb->wp_table_prefix = 'wp_';
$bb->user_bbdb_name = 'xxxxxxxxxx';
$bb->user_bbdb_user = 'xxxxxxxxxx';
$bb->user_bbdb_password = 'xxxxxxx';
$bb->user_bbdb_host = 'xxxxxxxxxxx';
$bb->custom_user_table = 'wp_users';
$bb->custom_user_meta_table = 'wp_usermeta';
$bb->authcookie = 'wordpress_cabxxxxxxx'; //identical to what is shown in Firefox cookie
$bb->cookiedomain = '.alleventsadviser.com';
define('COOKIE_DOMAIN', '.alleventsadviser.com');
$bb->cookiepath = '/';
define('COOKIEPATH', '/');
$bb->sitecookiepath = '/';In wp-config:
$table_prefix = 'wp_';
$wp->cookiedomain = '.alleventsadviser.com';
define('COOKIE_DOMAIN', '.alleventsadviser.com');
$wp->cookiepath = '/';
define('COOKIEPATH', '/');
$wp->sitecookiepath = '/';
define('SITECOOKIEPATH', '/');A registered user is shown in both bb and wp.
Thanks for any help. -
- Posted 3 years ago #
Hi everyone!
I integrated bbPress 0.9.0.1 and the 2.6.2 version of WordPress MU.
I have no problems, I think. -
- Posted 3 years ago #
I am having the same problems a Nekita. As soon as I ad the line
// require_once('pathto/wp-blog-header.php');
to my bbconfig file
I cannot access my admin anymore... It takes away the ability to reply to posts too..
when I switch it back.. fine again. Its the same problem I was having before upgrading to BBpress 1 alpha..
Too bad... I had a perfectly integrated Theme BBPress/Wpress before I upraded WP to 2.6.1.. i Will look before I leap next time.. oooops.
-
- Posted 3 years ago #
I've checked and double checked all the steps to coodinating wp-config.php with bb-config.php but no-go. I can only log into bbpress if I've already logged into wp, but even then it doesn't let me into the admin.
One possible area of confusion, I couldn't figure out how to get the .zip file that would display cookies to work. How is it supposed to be implemented?
I got the bookmark cookie check to work, but it gave a number of different sets of numbers.
/r__utmc=162181740
__utma=162181740.1942902695.1222437978.1224615332.1224620799.21
__utmz=162181740.1222437978.1.1.utmccn=(direct)|utmcsr=(direct)|utmcmd=(none)
__utmb=162181740
wordpress_test_cookie=WP+Cookie+checkWhich string is relevant?
-
- Posted 3 years ago #
I found more info on the setCookieparam plug in.
http://www.2diabolos.com/blog/?s=cookie
What threw me was that the download given here is in an 'upload' subdirectory, but needs to be uploaded to the plugins folder and implement the usual way. It can then be accessed through the 'settings.' But, I'm still confused. The instructions here say that it can be used to check the cookie settings, but all I see is the ability to set the cookies. If I am to set them, should I just follow the suggestions given with the plugin?
-
- Posted 3 years ago #
Okay, I tried using the settings that the setCookieParams seems to be recommending.
PathcookiePath: /
Cookie domain: blank
Cookie hash: 84bdfc54a51c9a8b123e73fe41df39a3No change in bbpress/blog behavior. When I use the bookmark to show cookie settings, they are unchanged since yesterday. It doesn't appear the setCookieParams worked.
Another question, the 2Diabolos site has two setCookieParams on the page. Is there one that should be used over the other?
-
- Posted 3 years ago #
Okay, I reverted back to the configs I had before, then added the lines recommended here one by one. Each of the following, when added one at a time, caused me to be unable to logout or enter the admin.
//$bb->user_bbdb_name = 'addivanet';
//$bb->cookiedomain = '.addiva.net';
//$bb->cookiepath = '/';
//$bb->sitecookiepath = '/';Both WordPress and BBpress are at least functional now, but no integration.
We're on Dreamhost. WordPress 2.5.1 and BBpress 0.9.0.2
Anyone see any clues here?
-
- Posted 3 years ago #
What would be the impact of launching the forum prior to getting the integration working? What would happen to the users/posts if we get the integration to work later?
-
- Posted 3 years ago #
I second keress's question - I have to get a BBpress forum up and running this weekend on a WordPress site that's already been upgraded to 2.6.3. And I don't really think I can just downgrade, because somewhere in the last few upgrades (don't know exactly when ) the posting interface in the admin changed drastically, and I don't want to confuse people too much.
It's not absolutely vital that they be integrated - the blog doesn't actually allow commenting, or new users to register at all - the only registered users it has are the owner (a professor) and his six teaching assistants. So they're the only ones who will benefit from integration - the students who would be posting in the forum can't register on the blog anyway. But it would be nice for the prof and TAs not to have to log in twice.
I don't want to inflict alpha software on them if I can avoid it, so I guess I'll just have to do without integration for now, but I'm wondering, if I end up trying to integrate the two later on, will that work?
-
- Posted 3 years ago #
Just install without integration. If you don't allow comments on the blog, then there's no reason for anyone to log in there, and integration wouldn't be helping anyone anyway.
-
- Posted 3 years ago #
I noticed that the cookie & secret related data changed between WordPress 2.6.2 and 2.6.3. Now I am able to find the information that bbPress 0.9.0.2 requests when attempting to integrate with WordPress.
Does this mean that WP 2.6.3 fixes the cookie-related issues that led to the edict "Do not try to integrate WP 2.6 and bbPress 0.9"? Or is that still a bad idea?
and no, I haven't tried to integrate the two in my latest install. I'm still trying to deal with some of my other install issues. I've stopped trying to integrate until I actually have the forum working.
-
- Posted 3 years ago #
@complex I think you're mistaken. WP2.6.2 - WP2.6.3 did not have cookie-related modifications.
WP2.6.3 did not fix 'cookie-related issues'. The edict still stands for bbPress 0.9x.
As I understand it, it is the move to bbPress 1.0 that uses the 'new' WP2.6x cookies.
If you find 'old' options they're probably there to permit backwards-compatibility with plugins etc that have not been upgraded yet.