I’m getting an error when I’m testing a “new account”. I’ve tracked it down to bbpress & woocommerce memberships.
Immediately on purchase I only get this:
Fatal error: Uncaught Error: Call to a member function get_users_for_object() on null in /home/customer/www/midwestpermaculture.com/public_html/wp-content/plugins/bbpress/includes/users/engagements.php:125 Stack trace: #0 /home/customer/www/midwestpermaculture.com/public_html/wp-content/plugins/bbpress/includes/users/engagements.php(146): bbp_get_users_for_object(47093, ‘_bbp_moderator_…’, ‘post’) #1 /home/customer/www/midwestpermaculture.com/public_html/wp-content/plugins/bbpress/includes/users/capabilities.php(107): bbp_is_object_of_user(47093, 366, ‘_bbp_moderator_…’) #2 /home/customer/www/midwestpermaculture.com/public_html/wp-includes/class-wp-hook.php(307): bbp_map_primary_meta_caps(Array, ‘moderate’, 366, Array) #3 /home/customer/www/midwestpermaculture.com/public_html/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array) #4 /home/customer/www/midwestpermaculture.com/public_html/wp-content/plugins/bbpress/includes/core/sub-actions.php(523): apply_filters(‘bbp_map_meta_ca…’, Array, ‘moderate’, 366, in /home/customer/www/midwestpermaculture.com/public_html/wp-content/plugins/bbpress/includes/users/engagements.php on line 125
Any ideas?
It would be really nice to have forums in our membership site.
Thanks!
Hello all,
I’m working in PHP in WordPress. I’m comfortable modifying and editing code.
I have a collection of Musical Artists and their releases. I’ve created a topic for each artist (post type) and release (post type) using bbPress Topics For Posts.
The user then replies to the topic. I want them to be forced to choose a tag when they reply: “Buy”, “Sell”, or “Info”.
Then I want them to be able to click a button that only shows replies tagged “Buy”, “Sell”, or “Info”.
How do I create a button to filter replies in PHP? Thanks!
Here’s an example of an artist page with a discussion forum below
sorry, I have bbpress running under WordPress, so if you don’t want to run WordPress, I cannot help.
You question is a bit like asking a ford car mechanic what the best motorbike is 🙂
sorry, bbpress only works with wordpress.
Hello!
I’d like to install bbpress on a non wordpress website and am not shure,
if bbpress is compatible.
Will it work and if so, how does the installation process look like?
I doubt this can be solved as posted without custom code.
You can import files using
GD bbPress Attachments
It would be possible to add some fields to the topic and or reply fields – this article explains the principals.
https://wp-dreams.com/articles/2013/06/adding-custom-fields-bbpress-topic-form/
Whilst it talks about the functions file, you can also use code snipetts
Code Snippets
so for instance if you wanted to try their code you would put all this into a single code snippet
add_action ( 'bbp_theme_before_topic_form_content', 'bbp_extra_fields');
function bbp_extra_fields() {
$value = get_post_meta( bbp_get_topic_id(), 'bbp_extra_field1', true);
echo '<label for="bbp_extra_field1">Extra Field 1</label><br>';
echo "<input type='text' name='bbp_extra_field1' value='".$value."'>";
$value = get_post_meta( bbp_get_topic_id(), 'bbp_extra_field2', true);
echo '<label for="bbp_extra_field1">Extra Field 2</label><br>';
echo "<input type='text' name='bbp_extra_field2' value='".$value."'>";
}
add_action ( 'bbp_new_topic', 'bbp_save_extra_fields', 10, 1 );
add_action ( 'bbp_edit_topic', 'bbp_save_extra_fields', 10, 1 );
function bbp_save_extra_fields($topic_id=0) {
if (isset($_POST) && $_POST['bbp_extra_field1']!='')
update_post_meta( $topic_id, 'bbp_extra_field1', $_POST['bbp_extra_field1'] );
if (isset($_POST) && $_POST['bbp_extra_field1']!='')
update_post_meta( $topic_id, 'bbp_extra_field1', $_POST['bbp_extra_field2'] );
}
add_action('bbp_template_before_replies_loop', 'bbp_show_extra_fields');
function bbp_show_extra_fields() {
$topic_id = bbp_get_topic_id();
$value1 = get_post_meta( $topic_id, 'bbp_extra_field1', true);
$value2 = get_post_meta( $topic_id, 'bbp_extra_field2', true);
echo "Field 1: ".$value1."<br>";
echo "Field 2: ".$value2."<br>";
}
There are reply equivalents, but would need you to specify what should go into topic and what reply
This might be the same as you are saying you don’t want – the user can press the submit, but it returns an error. As close as you’ll get without some js.
function rew_min_length ($reply_content) {
if (strlen($reply_content)<500) {
bbp_add_error( 'bbp_reply_content', __( '<strong>ERROR</strong>: Your reply must be at least 500 characters.', 'bbpress' ) );
}
return $reply_content ;
}
add_filter( 'bbp_new_reply_pre_content', 'rew_min_length' );
Hi, I have a great bbpress site, But how to check the text before submitting?
I want the user to write at least 500 characters before they can press submit.
I used the bbp_new_topic_pre_content hook but now I want them to not be able to press submit before being eligible.
Do you have any solution?
Many Thank
Hi there,
I’m new to this buissness and it’s my turn to explore feasibilities for my chemistry project (am a teacher). Finally it’s about generating questions and answers, a good and possible plugin would be of course bbPress. Following questions:
— is it possible to update an existing bbPress forum by reading data via import?
— an update to be read in only includes the data of the author, the question and the corresponding answer (keyword: new question resp. answer). Are there existing import options for this? Certainly … there are plugins like woocommerce etc, but they seem to me to be almost too much for the simplicity of the problem.
Well, thanks for answers, best regards, Rainer
my project: http://www.chemieaufgaben.ch , bbPress-Version: 2.6.9, wordpress: newest Version
I am just setting up bbPress and when I create a new topic and try to view it, it says “There has been a critical error on this website.”
This was happening with the forum itself at first, too, and I was able to work through that. I am so frustrated by this whole process.
Working with WordPress 5.9.2, bbPress version 2.6.9
Link to the site is http://www.griefhealingsuite.com/forums
find
find
wp-content/plugins/bbpress/templates/default/bbpress/loop-single-forum.php
and you’ll see several action hooks you can link to
We are running a LearnDash education site and have associated bbPress forums with our LearnDash courses. The forum appears correctly on the course page and the user can move to the course forum. But once on the forum there is no link to return to the course. Can such a link be added? If so, how would it be done?
Note that you will not be able to see the course or fourm screens as a non-logged-in user.
WordPress version 5.9.3
bbPress version: 2.6.9
LearnDash version 4.1.0
LD bbPress Integration version 2.2.2
education.theodorepayne.org/
that is a generic warning that bbpress throws up for all software that is not being maintained.
tweaks continues to work fine.
You could change it, but due to WordPress becoming obsessed with blocks, how to get it to work otherwise depends on may factors.
you could try this
Lightweight Sidebar Manager
I’ve not used it
bbpress has custom post types of ‘topic’, ‘reply’ and ‘forum’ – no idea if it will work
If it doesn’t – come back
Would you mind removing my debug information from my earlier post? Thanks.
Another quick question: Can you recommend a replacement for bbpress WP Tweaks? It hasn’t been updated in several years and my security software advises me to remove it.
I use it so I can have a unique sidebar for the bbpress forum (using twenty-seventeen).
so the key data is
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, null given in /home2/lemonst5/public_html/wp-content/plugins/moderation-tools-for-bbpress/incs/moderation.php:111
so the plugin ‘moderation-tools-for-bbpress’ is causing the error, from memory the issue is with it running with php8.x.
This plugin is closed and not being updated.
However I have incorporated all that functionality into my style pack plugin, where this error should not occur.
so deactivate the moderation-tools-for-bbpress and delete and then
bbp style pack
once activated go to
dashboard>settings>bbp style pack>Moderation.
ok, I cannot say why breadcrumbs are not working for you.
it could be a plugin issue
deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
Health Check & Troubleshooting
Then come back
I took above screenshot from somewhere else. But on my site the bbpress forum doesn’t have breadcrumbs.
I installed bbPress on WordPress 2022 theme and still it shows empty pages. Any work-around found?
not sure if you need to do it that way, would need work beyond free help to see if possible.
This while old still works as far as I know
Inline Image Upload for BBPress
Hi, how can i from WPForm -> upload pics to media library -> make post of them to bbpress forum ?
so did you do this bit?
it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentytwenty, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentytwenty, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
Health Check & Troubleshooting
Then come back
it could be a theme or plugin issue
Themes
As a test switch to a default theme such as twentytwenty, and see if this fixes.
Plugins
If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users
Health Check & Troubleshooting
Then come back
Hi,
I’m using WordPress 5.9.3 and bbPress 2.6.9.
I have checked the option for “Allow users to subscribe to forums and topics” in the bbPress settings. However, I don’t see the Subscribe/Unsubscribe button/link above a Forum. I do see the option to subscribe to a Topic when replying to a topic. I’ve tried viewing the forum while logged in with different user roles including Administrator but still no joy.
I have even tried creating my own shortcodes to try and output the subscribe link but it doesn’t output anything. e.g. while in the loop, bbp_forum_subscription_link( array( ‘before’ => ”, ‘subscribe’ => ‘+’, ‘unsubscribe’ => ‘×’ ) )
Is there something I’m missing?