Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Avatar of Stephen Edgar
    Stephen Edgar
    Participant

    @netweb

    Excellent, I’m glad it’s fixed :)

    I’m not sure the exact cause of the issue either but I will dig around in our code and see what’s going on, one confirmed issue is the bbPress “Group Forums” repair tool so I’ll get that fixed and then take a closer look at group forum permalinks.

    Avatar of Stephen Edgar
    Stephen Edgar
    Participant

    @netweb

    Presuming your forums are under the f1 parent in my previous post a couple of options to try:

    First potential solution:

    With your group forum that is broken create a new bbPress eg test under the f1 parent forum and then either via the front end or backend change that BuddyPress Group forum to point to the new ‘test’ forum you just created.

    What happens when you visit this group forum? Does it work as expected it should?

    Now go back and change the group back to the correct bbPress forum, does this fix it?

    Second solution if the first above does not work. Whilst BuddyPress is deactivated edit the bbPress forum permalink so that it matches the same URL structure as your BuddyPress Group that does work.

    Does this fix it?

    Avatar of Stephen Edgar
    Stephen Edgar
    Participant

    @netweb

    Ok, so are both the forums that you want to use for both groups you added the URL’s to above ‘sub-forums’ of the f1 forum?

    e.g.

     
    f1
    — correct-group-name
    — name of another group

    Avatar of Stephen Edgar
    Stephen Edgar
    Participant

    @netweb

    Ok, we’re closer, looks like the correct bbPress forum ID is correctly associated with the BuddyPress Group :)

    It looks like the slug/permalink is broken :(

    Before looking at a fix, a clarification if I could

    Here is my bbPress Forums Hierarchy Structure Layout

     
    BuddyPress Forums Category (Top Level Category)
    — BuddyPress Public Group Forum (Forum)
    — BuddyPress Hidden Group Forum (Forum)
    — BuddyPress Private Group Forum (Forum)

    In bbPress Settings (Settings -> bbPress) (/wp-admin/options-general.php?page=bbpress)

     
    “BuddyPress Integration” -> “Group Forums Parent” is set as “BuddyPress Forums Category”

    My bbPress settings for forum slugs are:

     
    - Forum Root Slug -> forums
    - Forum Prefix -> Check/Tick
    - Single Forum Slugs -> Forum -> forum

    So my URL’s are build with the “forum root slug” then the “forum single slug” then “BuddyPress Forums Category” and lastly the actual forum “BuddyPress Public Group Forum” which results in:

    /forums/forum/buddypress-forums-category/buddypress-public-group-forum/

    Now onto your URL’s:

    Yours with bbPress forum ID 127650

     
    /forums/forum/forums-2/f1/correct-group-name/

    Yours with bbPress forum ID 127628

     
    /forums/forum/forums-2/name-of-another-group/

    These infer the following:

     
    forums-2
    — f1
    — — correct-group-name
    — name of another group

    With your settings:

     
    “BuddyPress Integration” -> “Group Forums Parent” is set as “forums-2″
    - Forum Root Slug -> forums
    - Forum Prefix -> Check/Tick
    - Single Forum Slugs -> Forum -> forum

    As long as the quote/code formatting displays as expected is this what your bbPress forums layout hierarchy looks like?

    EDIT: Tweaked the formatting above and just trying to digest where the forums-2 comes from and why it is there, the f1 no doubt is part of the incorrect forum slug that we can get to with the fix, I’ve got to go dig through some source code of bbPress & BuddyPress to workout where things are broken and how to fix it.

    Avatar of Stephen Edgar
    Stephen Edgar
    Participant

    @netweb

    There are two locations you can edit the bbPress Group forum associated with a BP Group:

    Frontend:

    http://example.com/groups/buddypress-public-group/admin/forum/

    Navigate to the groups ‘home page’ -> Admin -> Forum
    (Where ‘buddypress-public-group’ is the name of the group forum)

    Backend:

    http://example.com/wp-admin/admin.php?page=bp-groups&gid=1&action=edit

    Wp-Admin Dashboard -> Groups -> ‘BuddyPress Public Group’ -> Edit
    (Where ‘gid=1′ is the group forum ID)

    Each of those screens should show both a checkbox and a dropdown menu showing the available bbPress Forums to associate with that particular BuddyPress Group.

    Do both show the correct/expected bbPress forum selected?
    (If you think any of the forum names in these dropdowns is ambiguous view the HTML source of the dropdown and each forum should also have a value= form field and that will be the ID of the bbPress forum)

    However I do note that on the forums page although the ‘Edit’ button shows the correct forums_id values for each forum, the ‘View’ button shows an incorrect link for the problematic forum.

    Hmmm… To continue using my same examples I have thus far, the bbPress Forum I am using has an ID of 25 and it’s edit link is http://example.com/wp-admin/post.php?post=25&action=edit, it’s view link is http://example.com/groups/buddypress-public-group/forum/. Because BuddyPress is activated we add some redirection bits and pieces so we cannot directly modify the bbPress forum permalink whilst BuddyPress is activated.

    If you deactivate BuddyPress for a moment and check the view link of the same bbPress forum it should be similar to http://example.com/forums/forum/buddypress-forums-category/buddypress-public-group-forum/ where in my case buddypress-forums-category is the bbPress parent forum category that all by BuddyPress group forums are located under and buddypress-public-group-forum is the bbPress forum.

    So comparing my examples above do you see anything in your config that differs that matches up with your URL mismatch somewhere….

    Clear as mud all of the above ;)

    Avatar of Stephen Edgar
    Stephen Edgar
    Participant

    @netweb

    Also did you try updating via the ‘Group Forums’ Edit Screen UI?

    It should be correctly updating the bbPress Forum there for your BuddyPress Group, did it? did you try?

    Avatar of Stephen Edgar
    Stephen Edgar
    Participant

    @netweb

    As per your original post you are using bbPress v2.5.4, the bb_forums table are part of the legacy BuddyPress Group Forums/bbPress v1.x Forums.

    bbPress 2.x no longer uses these tables, all of bbPress 2.x forums, topics and replies are in the wp_posts table as custom post types.

    If you look in the bbPress Forums panel and hover your mouse over or edit one of the forums you will see the post ID in the URL, you will find that (educated guessing here) that most of your forums have a six digit ID’s?

    Each of those ID’s should correspond to the bbPress 2.x Forum attached to each BuddyPress Group Forum as you see in your wp_groups_groupmeta table.

    So if you look in the wp_groups_groupmeta table at your group ID 26 and that 127650 value does NOT match the bbPress forum ID you expect it should match.

    Grab the correct bbPress forum ID and write down the current ID if you need to revert, bakcup your database etc etc) then update that value and I think you should be sorted.

    Avatar of Stephen Edgar
    Stephen Edgar
    Participant

    @netweb

    Thinking about this further by updating the bbPress forum associated with the BuddyPress Group via the BuddyPress Groups edit should update the value in wp_bp_groups_groupmeta as I outlined above.

    Before you try the MySQL direct approach above could you try editing the group and seeing if the the bbPress forum ID is updated correctly please.

    Dashboard -> Groups -> Edit Group

    Then, on the far right is a dropdown to select the bbPress forum associated with the BuddyPress group, if you change this does it update forum_id in wp_bp_groups_groupmeta with the correct bbPress forum ID?

    Avatar of Stephen Edgar
    Stephen Edgar
    Participant

    @netweb

    It looks like there is a bug in bbPress’ repair tool :(

    If you grab the bbPress forum ID e.g. 25

    Open up wp_bp_groups_groupmeta

    You should see something similar to this:

    
    id	group_id	meta_key	meta_value	
    1	1	total_member_count	2
    2	1	last_activity	2014-06-26 00:37:33
    3	1	invite_status	members
    4	2	total_member_count	1
    5	2	last_activity	2013-11-03 10:35:12
    6	2	invite_status	members
    7	3	total_member_count	1
    8	3	last_activity	2013-11-03 10:37:53
    9	3	invite_status	members
    10	1	forum_id	a:1:{i:0;i:25;}
    11	2	forum_id	a:1:{i:0;i:27;}
    12	3	forum_id	a:1:{i:0;i:29;}
    

    So for group group ID 1 the bbPress forum ID 25 is stored as a:1:{i:0;i:25;} (serialized array), thus change the 25 to the correct bbPress forum ID you need.

    I’ll go write up a fix for bbPress repair tools for the next release :)

    Avatar of Stephen Edgar
    Stephen Edgar
    Participant

    @netweb

    There is a basic outline of what to do http://codex.bbpress.org/theme-compatibility/

    Also this should be helpful:

    http://codex.bbpress.org/theme-compatibility/step-by-step-guide-to-creating-a-custom-bbpress-theme/

    You also only need to copy the templates that you want to change.

    Avatar of Stephen Edgar
    Stephen Edgar
    Participant

    @netweb

    There is a chance it could be affecting new groups though I thought if that was the case this would have already been picked up as a bug.

    The best way to determine if that is the case will be with phpMyAdmin looking at the foloowing tables:

    • `wp_bp_groups`
    • `wp_bp_groups_meta`
    • `wp_posts` using this query `SELECT * FROM wp_posts WHERE post_type LIKE forum`
    • `wp_postmeta` using this query `SELECT * FROM wp_postmeta WHERE meta_key = _bbp_old_forum_id`
    Avatar of Stephen Edgar
    Stephen Edgar
    Participant

    @netweb

    I have a feeling it may be related to Step #6, when the bbPress repair tool ‘Repair BuddyPress Group Forum relationships’ works only the first time it is run, subsequent attempts will not actually update bp_groups_groupmeta.id with the correct forum ID.

    Details of this are in bbPress ticket #2089

    If and ONLY if in your WP database tables `wp_bp_groups.slug` is an exact match with the associated post for the forum in `wp_posts.post_name` then the 2089.2.diff patch will work as long as this forum was one of the group forums originally imported.

    Diving into phpMyAdmin and looking at these values and manually updating them I think will be the best solution.

Viewing 12 replies - 1 through 12 (of 12 total)