Forums index vs custom page shorturl
-
Been looking into this for a few days, and I can’t find a solution.
By default, bbpress offers two solutions for the index of a forum page:
- Using the default settings, and a customizable ‘forum root’ available in the settings panel
- Using a page with a shortcode to implement the section that you want
However, when you use the shortcode solution, there are two ‘forum root’ urls. The one that is associated with the page you want to use, and the one generated with the ‘forum root’ url.
For example, let’s say that I created the forum using the shortcode on site.com/discuss, and I need to use custom fields to customize the appearance of that page with a header, a hero graphic, and some descriptive text. I can style it, and it looks perfect. However, the site.com/forums url is still present in the forum topic urls (site.com/forums/post, not site.com/disucss/post), and as it’s own page without the custom styling.
While I could customize the page template for bbpress on site.com/forums, there are no methods for displaying fields defined by the client/user in the dashboard on that template, completely eliminating the purpose of using the custom page & shortcode option.
Are there any solutions for this or am I stuck? I’ve yet to find any solutions on this.
-
If I have understood correctly, you need to change the forums slug
Dashboard>settings>forums and change forum root slug to in your case discuss
Doing so breaks the page. It creates a conflict by attempting to dynamically generate a forum root, using the same url as the wordpress page which is using the shortcode.
Doing so breaks the page. It creates a conflict by attempting to dynamically generate a forum root, using the same url as the wordpress page which is using the shortcode.
This works fine for me and is part of the backend philosophy of how bbPress works allowing a page with the same name as the forum root to take precedence.
* Created a page titled
discuss
and added the shortcode[bbp-forum-index]
* Changed the bbPress setting ‘Forum Root Slug -> Forum Root’ todiscuss
So now for the site http://example.com/
– A forum list at http://example.com/discuss/
– A topic at http://example.com/discuss/topic/exammple-topic/
– A forum at http://example.com/discuss/forum/example-forum/I keep trying this method, and every time I get the result “Possible BuddyPress Conflict” and then the page (in this case http://example.com/discuss) returns page not found.
Throughout WordPress and bbPress and BuddyPress included having posts, pages, terms can NOT have the same slug, most likely you have something else either titled or using the slug
discuss
and this includes any items in trash as even though they are in the trash they still reserve that slug and it is not released until the item is removed from the trash.I cant seem to find an error for the term “Possible BuddyPress Conflict”, where are you seeing this error?
Alright. Let me run through this one more time to see if I’m overlooking something. My real world scenario uses the page http://example.com/sound-off-forum as the page I want to use from wordpress. The slug is set to sound-off-forum, as that is the url I’d like to use, and each is the desired url for my forum.
Page is visible here: https://i.imgur.com/Eiz8xyL.png
Admin panel view: https://i.imgur.com/DL3MXzj.pngI then set the forum root to “sound-off-forum” and get this result
bbPress Error: https://i.imgur.com/rp7yLGF.png
http://example.com/sound-off-forum page no longer working: http://imgur.com/3b314S3Using ‘sound-off-forum’ as you have in your example works for me
https://i.cloudup.com/K4YTnskjg0.png
If I change my forums root slug to ‘groups’ I get the error “Possible BuddyPress conflict: Groups page“, thus I have a slug conflict with BuddyPress’ ‘Groups’ page.
So onto your “Possible BuddyPress conflict: Sound Off Forum page” error.
Are you using BuddyPress’ ‘Legacy’ Group Forums?
Do any of your BuddyPress Activity, Groups, Members, Register or Activate BuddyPress page settings link to that same ‘sound-off-forum’ page and/or have page names with a similar slug name?
https://i.cloudup.com/RxLi9qai1J.png
Lastly what bbPress settings are you using for the BuddyPress group forums setting?
(at the bottom of the bbPress settings page)Oh… Maybe try this before you go any further as I am sure this is just a slug conflict somewhere…
It could be an issue with your rewrite rules. To fix this try resetting your permalinks. In your WordPress Administration Screens navigate to Settings > Permalinks, select a different permalink structure and save. Then select your preferred permalink structure and save again.
I’ve tried the things listed, and compared it exactly as we’ve run through. I currently have the buddypress legacy forums turned off as it’s a new install, but I took a shot and disabled buddypress. It completely resolves the issue. A clean install breaks it again. I’m not sure what it is that out-of-the-box would break it like that, but it appears there is a conflict between BuddyPress 2.0 and bbPress 2.5.3.
A clean install breaks it again. I’m not sure what it is that out-of-the-box would break it like that, but it appears there is a conflict between BuddyPress 2.0 and bbPress 2.5.3.
This is extremely rare, not saying it can’t happen, the fact that BuddyPress uses bbPress for forums 99% of the time the BuddyPress developers will have bbPress enabled. I have BuddyPress enabled for ~75% of the time and typically only deactivate it when working on bbPress profiles. In short we usually catch any conflicts ourselves before releasing a new version of either plugin.
Also the fact that I have both plugins activated now using the same slugs you are trying to use and don’t get that error eliminates the plugins having a conflict as the issue in this case.
Can you spin up an entirely fresh WordPress install with just bbPress and BuddyPress and use the Twenty Fourteen theme and see if the issue still occurs.
I just went trawling through the raw database options for WordPress in
wp_options
trying to find something that may cause the conflict and couldn’t find anything of interest.I just ran through and did a brand new install of WordPress with Twenty Fourteen as the theme, only plugins are bbPress and BuddyPress. It appears to have worked. I wiped the plugins, and tried again with no luck. Here’s a rundown of my process:
Permalinks set to postname.
bbPress installed first, forum root url set to ‘sound-off-forums’, saved. All other settings left default.
Page created with slug ‘sound-off-forums’, page works, shows forums as expected.
BuddyPress installed, default configuration left alone. ‘http://example.com/sound-off-forums’ fails to load, showing a 404 page.
I have no idea. It sounds like I’ll likely need to scrub the DB any trace of bbpress and buddypress from my environment and start over. Thanks for the help with everything. It must have just been an installation error.
I’m having a similar problem to dustinarmstrong. But its not exactly the same.
I’m trying to fix a broken forum set up for a client. I did not do the forum installation (he did it himself) AND the forum is installed on a live site that gets lots of web traffic so I don’t want to do anything that might impact the website overall.
Here’s my situation:
1) BBPress was installed (I don’t have details about when and how),
2) a page was created with the[bbp-forum-index]
shortcode on it
3) the forum didn’t work, so my client contacted me to fix it
4) I went into settings > forums and changed the forum root slug from the default “forum” to “travel-forums” (the name of the page where the shortcode lives. The error message “Possible bbPress conflict: Forum slug” showed up next to the slug field after saving the settings.
5) I also changed the single forum slug from the default “forum” to “travel-forums”. The error message “Possible bbPress conflict: Forums base” showed up next to the slug field after saving.In my case, the forum page DOES show up at http://foobar.com/travel-forums but it is empty except for the welcome text that I had entered into the forum main window. (So it just says “Welcome to our forum” without any of the discussion topics showing up.
Also, I have the “Recent Topics” widget enabled on my sidebar and my three test discussion topics DO show up there. When I click on any of them they take me to the correct URL but the pages are blank. So, for example, when I click on “test topic” in the widget I land on http://foobar.com/travel-forums/topic/test-topic/ and the page displays the topic header “Test topic” and the topic question “what do you think about travel?” but it doesn’t display any of the posts.
I’m not sure if this behavior is related to the slug conflict error messages or if something else is wrong.
I’m trying to follow the advice that Stephen Edgar gave.
First up, I think this is probably true in my case:
most likely you have something else either titled or using the slug discuss and this includes any items in trash as even though they are in the trash they still reserve that slug and it is not released until the item is removed from the trash.
This is probably a stupid question but How do I empty the trash to make sure that the old slug is removed?
Second, I’d like to try this:
To fix this try resetting your permalinks. In your WordPress Administration Screens navigate to Settings > Permalinks, select a different permalink structure and save. Then select your preferred permalink structure and save again.
but since my website is live and has been for a long time (and has lots of blog posts using the custom structure already) I’m concerned that this could permanently break the existing links. Any thoughts on this?
This is probably a stupid question but How do I empty the trash to make sure that the old slug is removed?
No stupid questions here !!
Go into Dashboard>forums> all forums and look at the top for all | published | Trash
Trash will only show if you have any. If you do click and you can permanently delete
Repeat for topics and replies, and possibly for posts and pages as well.I’m concerned that this could permanently break the existing links.
I don’t think it will but cannot guarantee, it should only affect anything being created at the time you are doing it, so anyone creating a page, post or forum topic or reply. Quite a lot of advice on wordpress for resetting permalinks is to simply go in and click save, as this still forces a rewrite to the database, so maybe try that first.
I have a very similar problem and I must admit I have posted it as a seperate topic, but you guys seem so close to the problem (and solving it) that I trust it’s ok to post here as well.
I am using the Listify Theme and there does not fundamentally seem to be a default template that will work with bbpress. No matter what template I choose and copy as the plugin-bbpress.php template for example – it won’t work. Here’s an example of the page not working – http://tattsamistake.com/forums/
So….I built a custom page and put the shortcode in it – and the page works. BUT when I click thru to a forum, I get my navigation path which links to the forums page that doesnt work – ie the path shown is … Tattoo Removal Australia › Forums › Tattoo Removal
and if i click on ‘forums’ it goes to the non-working page – http://tattsamistake.com/forums/
BUT if i go and change the slug from ‘forums’ to ‘Tattoo-forum’ (the customised page that does work) it goes and applies a non-working template to that page, so in effect killing the page.
I guess to solve it I need the following…
1. A way to tell it where the forum short-code is without over-writing the page template
2. This may sound very silly but is there such a think as a generic bbpress.php template that I can use and upload to my site? Sure it won’t look like my site, but it would be a starting block.
3. Can I just get rid of ‘forums’ in that path, or at a pinch just get rid of that path from displaying completely?Any help much appreciated!
I am having the same problem as @aaronos.
The bbPress page with the shortcode has the URL /forums, with the page title of “Forum”
The forum root slug is set to “forum” in the forum settings
The single forum slugs is set to “forums”
The yoast SEO breadcrumb I am using shows home>forum on the forum index page (/forums)
When I click into a topic the URL changes to /forum/forums/[FORUM TITLE]
On the /forum/forums URLS the Yoast breadcrumb changes to “/forums” but it actually links to “/forum”NOTE: /forum is a page that does not technically exist (i.e. I did not create a page with this URL) yet some random topics show up on this page.
I have tried every iteration of changing the UTL of the index page, the page name, and the two settings in bbPress with no success.
I have to set the forum index URL to /forums for my forum index page to look properly, but essentially whenever I navigate to any post or topic the breadcrumb breaks.
Thanks for any guidance and advice.
Hi,
Just to be sure, you tried the permalink thing like netweb indicated ?
It could be an issue with your rewrite rules. To fix this try resetting your permalinks. In your WordPress Administration Screens navigate to Settings > Permalinks, select a different permalink structure and save. Then select your preferred permalink structure and save again.
Pascal.
Resetting the permalinks did not work.
Found this, while searching for a solution with the shortcode on an own page. This issues seems still exist in 2021!!! If i create a page with shortcode the page show an empty page if the forum index has the same permalink as the the page!
go save me re-reading all of a 5 year old thread, could you please state what shortcode, what pge url and what forum slugk you have
It’s about the [bbp-forum-index], but it seem that the failure is coming from my theme (pro from theme.co)
If I style the page with their builder the output seems to be broken. It works if the page is created with the standard WordPress editor.
I will contact them about this.
ok let us know what they say !
Hello,
I don’t know if anyone here was able to resolve their issue, but mine is quite similar to the OP.
Scenario: Created a forum with the shortcode [bbp-forum-index] on page with having slug /custom_forum to output index page. Used css to style the page (no theme builder).. In the forum settings, the root is set to /forums. When visiting /custom_forum, all the style appears great.
However, if I head to Settings–> Forums to change the root from /forums to /custom_forum (where my shortcode is placed), I lose all the styling.
I reset the permalinks as suggested above to no avail. I know it’s been over 7 years this has been reported and I hope anyone out who’s found a solution can assist me. Thanks in advance for your support.
As a test can you try not having the underscore eg customforum as a single word and see if that makes a difference.
Also are you running buddypress as well ? (question not suggesting you should or shouldn’t !)
Hi Robin,
Thanks as always for your assistance.
Starting with the last question, I have BuddyPress installed but not activated…As for the slug, I’ve now ditched the underscore thing and went with /lab for the shortcode page, and in settings, /forums for the root and /forum for the forum. My permalinks are back to %postname%. This current setting guarantees that all my styles are displayed properly when accessing the page with the bbp-forum-index shortcode.
If I visit the /lab page, it’s all good until I clicked on a specific forum. Then the /lab is lost to acquire /forums (declared the settings) and thus display a 404 error page since there’s no page with that /forums/forum/topic, etc.
When I switch to having the shortcode page slug and settings slug be the same, no 404 error message, but all customizations vanish.
I’ve read some other post talking of templates not being properly referenced and honestly, so I created a bbpress folder in my childtheme. Since I’m not sure which templates/file to copy inside the newly-created BBPRESS there, I tried copying all php files included in the default template folder inside the BBPress plugin, and it didn’t go to well, so I removed them.
Still not sure where else to look. 🙁
I appreciate other pointers you or other bbpress-ers might have.Best,
HI don’t know how you excactly you want to style the forum index page, but i found out that the index page doesn’t have the bbpress class included in the body tag like the sub pages. So i had the problem too that i couldn’t style the index page.
Here is my code i use to add this class, and others, to the body tag for the index page. Then you can style the index page with css.
add_filter( 'body_class', 'bbpress_add_body_class' ); function bbpress_add_body_class( $classes ) { global $wp; $bbpress_index = get_option ('_bbp_root_slug'); $bbpress_search = get_option ('_bbp_search_slug'); if (strpos($wp->request, $bbpress_index) !== false) { $classes[] = "bbpress"; } if ($wp->request == $bbpress_index) { $classes[] = "bbpress-index"; } if (strpos($wp->request, $bbpress_index . "/" . $bbpress_search) !== false) { $classes[] = "bbpress-search"; } return $classes; }
- You must be logged in to reply to this topic.