Skip to:
Content

BuddyPress.org

Opened 14 years ago

Closed 13 years ago

#2535 closed defect (bug) (no action required)

Group Forums Showing in Standalone bbPress

Reported by: alhoon's profile alhoon Owned by:
Milestone: 1.5 Priority: critical
Severity: Version:
Component: Core Keywords: dev-feedback
Cc:

Description

Adding group forum functionality to an existing site has resulted in the group forums appearing in an integrated standalone bbPress install.

This was tried on a test site where it worked fine first time with no issue, and then later (activated in an identical manner) on the live site, where it immediately ran into problems. Both are WP 3.0 (established installs) + BP 1.2.5.2 (newly installed from 1.2.5), integrating onto an established standalone bbP 1.0.1 (not yet deep integrated) with hundreds of thousands of posts (and a largely empty test version).

On the live site, enabling the forums and pointing them to the config completes, and forums appear in the UI.

However, a first post resulted in "There was an error when creating the topic." Activity updates were correctly issued, but nothing appeared in the forum. After mysqlchecking the DB and deactivating and reactivating the forum component, new topics did appear in the group forum properly.

However, the group forum posts, irrespective of being in groups public or hidden, now appear amidst the normal posts on the standalone forum as well (in fact it seems they did from the start), and a normal forum bearing the group name and details is added to the forums on the standalone bbPress. This certainly did not happen on the test site.

Manually inspecting and editing the DB to clear the relevant fields, as well as using the UI deactivation options, do nothing.

The only really significant config difference I can see between the two installs is that the test site has everything in one DB with different table names, whilst the production site has two discrete DBs.

As it is a production site with tens of thousands of users and a very high level of group activity, testing ability is somewhat constrained, and clean reinstalls are impossible.

You can see other users have been experiencing somewhat similar problems, without any consistent resolution, elsewhere:

http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/forum-error/

http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/forum-threads-not-created/

http://premium.wpmudev.org/forums/topic/buddypress-forum-there-was-an-error-when-creating-the-topic

It seems the migration code still has significant issues under some circumstances?

Change History (14)

#1 @r-a-y
14 years ago

  • Keywords dev-feedback added

Unfortunately, this goes outside the realm of Wordpress and hence, BuddyPress. It has nothing to do with migration since you're telling BuddyPress to use an existing bbPress install.

You'll have to add a custom plugin to standalone bbPress to hide these group forum posts in your standalone bbPress install.

I did a writeup a while back that accomplishes something like this:
http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-hide-bbpress-forums-from-users-while-allowing-forums-in-buddypress-groups/#post-33582

Proposal to close ticket. I think I'll have to writeup a codex article on BP.org.

#2 @alhoon
14 years ago

I did somehow expect the report would be blown off considering the other reports seemingly dropped into a black hole.

The position you're arguing for makes no sense. The docs are very unclear, but from our research it seems the only officially supported (and if it isn't supported, what on earth is it doing in the forums activation routine?) way of having Group Forums and a pre-extant bbPress standalone is to use the existing install.

Utilising a new install will apparently trash the existing install by overwriting its tables? And would merging/coexisting a simultaneous integrated install and a standalone install even be supported when bbPress is a WP plugin?

The bbPress people won't have anything to do with BuddyPress and I can almost guarantee they won't address any issue caused by BuddyPress incompatibility. If we assume this is a bug in BuddyPress, and neither BuddyPress/Wordpress nor bbPress will acknowledge it as being within their purview, just who will?

Additionally, bbPress is now confirmed as becoming solely a Wordpress plugin after 1.1. Similar migration issues of standalone installs into plugin installs are bound to occur there - it would be astonishing (and disastrous) if developers were to say those are "outside the realm of Wordpress" as well, yet the situation is practically the same...

I expect we can fix this by hiring in a developer for a custom hack, so I'm not so much concerned about that, but for these bugs to go unsupported seems odd and disquieting.

#3 @r-a-y
14 years ago

I am not arguing. I'm merely stating facts.
I should state that I'm not on the BP core dev team.

I did not "blow off" your report either, otherwise I wouldn't have pointed you to the forum post, which details how to hide group BP forum posts on a standalone bbPress install (I admit, the instructions need to be cleaned up).

I have also asked about the same thing when bbPress became integrated into BuddyPress since v1.1. You're not alone.

---

Re:

The docs are very unclear, but from our research it seems the only officially supported (and if it isn't supported, what on earth is it doing in the forums activation routine?) way of having Group Forums and a pre-extant bbPress standalone is to use the existing install.

This isn't correct. The way you mention is one way. The other way is setting up a new install on the "BuddyPress Forums Setup" page. You would be using two sets of bbPress tables though, whereas the method you mention would use one set of tables.

---

Re:

Utilising a new install will apparently trash the existing install by overwriting its tables? And would merging/coexisting a simultaneous integrated install and a standalone install even be supported when bbPress is a WP plugin?

This isn't correct. BuddyPress creates a new set of bbPress tables, so your existing one doesn't get "trashed". Re: second point - bbPress is in a state of flux. It will be up to the BP core dev team to decide whether BP will utilize bbPress as a Wordpress plugin when it emerges.

---

Re:

Similar migration issues of standalone installs into plugin installs are bound to occur there - it would be astonishing (and disastrous) if developers were to say those are "outside the realm of Wordpress" as well, yet the situation is practically the same...

By "outside the realm", I was referring to the installation process. Two different scripts: Wordpress and standalone bbPress. You want to somehow tell your existing, standalone bbPress install to hide BuddyPress group forum posts? There are so many running variables to consider that it would be impossible to offer a solution out of the box.

Again I refer to the forum post to accomplish what you need to do.

#4 @alhoon
14 years ago

Thank you for your detailed response. I had assumed you were a core developer based on your evident knowledge in the BP forums, so I suppose that is up to them.

I'm not really aware of any pressing advantages to maintaining a single set of bbPress tables, particularly when the situation with incompatible extensions complicates any meaningful integration. I think we'd be able to try the BP forum installation method without issue as well as the custom plugin approach.

WP one-click upgrades are normally excellently executed and in no need of detailed documentation, but this can be problematic when things go wrong or non-standard implementations are involved, and standard bbPress is barely usable without major extension.

In the event that this issue goes unresolved, some documentation explaining the differences and requirements of the two integration methods would probably be welcomed - as you can see the only information I was able to come away with after much searching was sketchy and frequently incorrect. The level of confusion surrounding bbPress, bbPress WP and bbPress BP is frankly something which needs to be addressed.

#5 @alhoon
14 years ago

There does seem to be a bug in the core BP version of bbPress.

Installing the one-click version worked, but no amount of fiddling will allow pre-existing groups to create working forums - they give only "There was an error when creating the topic" and inspecting the DB reveals no group forum or groups_meta entry. The usual deactivating and reactivating, etc, makes no difference. However, creating a new group does seem to create a forum.

Forums were created OK for old groups on the standalone version.

#6 @johnjamesjacoby
14 years ago

  • Milestone changed from 1.2.5 to 1.3

When you install bbPress from inside BuddyPress, you're presented with two options. One is to use an existing installation, which you provide the location of, the other is to create a new installation for BuddyPress to use exlusivly on it's own. If you choose to use an existing installation, naturally you're choosing to integrate the two together, where all topics and forums exist in the same place. If that isn't what you want, then you shouldn't be choosing that option.

You should really only pick the first option if you're planning on figuring out a custom solution that fits your needs, since there are about ten types of possible configurations you could have. If you pick option one, on an existing bbPress only install that was never previously integrated with BuddyPress, you've got some work to do since you have forums and categories without BuddyPress groups to use to present that information within the BuddyPress template. Or, you need to customize your bbPress loop query to disclude the main BuddyPress group forum root category so they aren't visible within your old bbPress template.

Is this optimal? Probably not, but BuddyPress core does it's best to account for the most likely scenarios. bbPress standalone just doesn't play nicely within WordPress, and BuddyPress takes care of some of those woes, but not all of the possible situations.

I'm bumping this ticket to 1.3 because I'd like to see better forum integration myself, but we probably won't get to it until then.

#7 @r-a-y
14 years ago

I've already replied to Al on the forums and he's got group forums hidden now on his standalone bbPress install using my tutorial.

The solution I posted on the forums is basically a modified version of _ck_'s "Hidden Forums" bbPress plugin.

I think the sensible thing for BP 1.3 is to add some instructions on the "BuddyPress Forums Setup" admin page for existing bbPress installs. It could be as simple as a link to a BP codex article.

#8 @r-a-y
14 years ago

Codex article written:
http://codex.buddypress.org/how-to-guides/using-an-existing-bbpress-installation/

The pros and cons section needs another set of eyeballs, but alas I'm tired!

#9 @boonebgorges
13 years ago

Has any progress been made on this issue? I assume the problem is that there is a conflict between table names in the standalone and BP versions of bbPress. If the two instances of bbPress had different $bb_table_prefix in their respective bb-config.php files, this almost certainly couldn't happen.

One possibility is that we might set the default value of $bb_table_prefix in bbPress to something less likely to conflict with standalone versions, eg 'wp_bp_bb'. Though I'd think that truly standalone versions of bbPress wouldn't have 'wp_bb_' as a prefix anyway. Thoughts?

#10 @r-a-y
13 years ago

I don't think the issue stems from database table name conflicts.

The issue is standalone bbPress will never see BuddyPress because Wordpress and bbPress are two different scripts.

In order for standalone bbPress to even acknowledge BuddyPress group forums, standalone bbPress would need to deep integrated with Wordpress. Or a standalone bbPress plugin could be written using database lookups to the BuddyPress group table and doing some checks (this highly depends if standalone bbPress is installed in the same database as Wordpress).

The other alternative is hiding BP group forum posts from standalone bbPress altogether. The codex article I wrote outlines this.

#11 @boonebgorges
13 years ago

I guess I'm a little confused about the problem then. The OP made it sound like standalone bbPress was showing forum posts from private BP groups. The only way for that to happen is if bbPress is looking inside of BP's bbPress tables.

#12 @r-a-y
13 years ago

The OP is correct.

For the sake of the following example:
-an existing bbPress install exists at example.com/forums
-we're about to install BuddyPress using the existing bbPress install, but changing the BP_FORUMS_SLUG to example.com/group-forums/

BuddyPress' group forums will have the permissions set up correctly, but in standalone bbPress (/forums/), bbPress doesn't know about BP's group permission rights and thus all forum posts will be clearly visible.

#13 @boonebgorges
13 years ago

Ahh, I see. I was missing the part where forums were being set up as "an existing bbPress installation". D'oh.

Now that I see what's going on, I think I agree with you r-a-y that this is an issue with the bbPress template loop and not so much BuddyPress. The instructions you give on the codex page are succinct and clear. Maybe this ticket can be filed as invalid?

#14 @johnjamesjacoby
13 years ago

  • Resolution set to invalid
  • Status changed from new to closed

BuddyPress can't really control what happens on an external bbPress installation. That's the benefit of having an external install actually, having complete control over your forums rather than letting BuddyPress handle them all.

testbp.org had this same problem for almost a year before we switched to the 1.2 style of loading bbPress internally.

Marking as invalid, since bbPress (plugin) will alleviate these issues in the future.

Note: See TracTickets for help on using tickets.