OK, have rumbled it rather quicker than expected. There is a code snippet to place the “Contact” link in the forum – I tried deactivating it but could not. After several activations and deactivations of “Front End PM” it seems to have turned that off for me and all seems to be working now as it should.
Fingers crossed . . .
John
PS – and thanks for being so patient with me, and forgive me also for initially blaming the upgrade.
Doh! Lawdy me, how stupid can I be? Deepest apologies.
I do want to retain the private groups, so please forget that side of things.
It is “Front End PM” that I want to remove, and disabling that has re-introduced the fatal error on the forum pages.
The debugging reports:
Fatal error: Uncaught Error: Call to undefined function fep_current_user_can() in /home/signalbo/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(584) : eval()’d code:5 Stack trace: #0 /home/signalbo/public_html/wp-includes/class-wp-hook.php(324): {closure}(”) #1 /home/signalbo/public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array) #2 /home/signalbo/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /home/signalbo/public_html/wp-content/plugins/bbpress/templates/default/bbpress/loop-single-reply.php(56): do_action(‘bbp_theme_after…’) #4 /home/signalbo/public_html/wp-includes/template.php(812): require(‘/home/signalbo/…’) #5 /home/signalbo/public_html/wp-content/plugins/bbpress/includes/core/template-functions.php(103): load_template(‘/home/signalbo/…’, false) #6 /home/signalbo/public_html/wp-content/plugins/bbpress/includes/core/template-functions.php(41): bbp_locate_template(Array, true, false) #7 /home/signalbo/public_html/wp-content/plugins/bbpress/ in /home/signalbo/public_html/wp-content/plugins/code-snippets/php/snippet-ops.php(584) : eval()’d code on line 5
so I understand from that the error lies with the code-snippets plugin although as yet I’m not quite sure where to start on that. I’ll give it some thought but if you have any suggestions they wuld be appreciated.
John
1. yes, this is the intended behavior
2. yes, that behavior is set by a function which is called by an action, so we can remove it, and do something else.
so untested, but this should work
remove_action( 'bbp_template_redirect', 'bbp_forum_enforce_blocked', 1 );
add_action( 'bbp_template_redirect', 'rew_forum_enforce_blocked', 1 );
function rew_forum_enforce_blocked() {
// Bail if not logged in or keymaster
if ( ! is_user_logged_in() || bbp_is_user_keymaster() ) {
return;
}
// Set 404 if in bbPress and user cannot spectate
if ( is_bbpress() && ! current_user_can( 'spectate' ) ) {
//DON'T DO THE SET 404 ie this is the code that the default bbp_forum_enforce_blocked does
//bbp_set_404();
// DO SOMETHING ELSE HERE!
}
}
What the something else is, you will need to decide
Put this in your child theme’s function file –
ie wp-content/themes/%your-theme-name%/functions.php
where %your-theme-name% is the name of your theme
or use
Code Snippets
3. I can’t say what the original authors intentions were, but I suspect yes
I have 1 success to report thanks to your WP_DEBUG suggestion:
- There were error messages being generated by bbpress Simple View Counts in debug.log, so I deactivated the plugin, and now the critical error messages are no longer seen when viewing topics.
The saving of updates to large topics containing table tags is still not working.
Not sure if these are relevant, but I’ve seen these messages about null parameters in functions.php:
[06-Jul-2025 14:51:35 UTC] PHP Deprecated: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in /var/www/html/wp-includes/functions.php on line 7360
[06-Jul-2025 14:51:35 UTC] PHP Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/html/wp-includes/functions.php on line 2195
Any assistance will be gratefully received, as my PHP knowledge is limited.
do come back if you are able top tell me the error codes, quite happy to try and help further
I figured out my mistake. I installed the plugin, created a menu http://www.domain/forums, but did not create a page with the forum’s name and shortcode. Once, everything worked.
Hope will help…
ok, so this on my test site with just bbpress and style pack, using admin and keymaster roles publishes fine
<table>
<tbody>
<tr>
<td>
hello
</td>
</tr>
</tbody>
</table>
do you still get a critical error with this combination, and if so I still need the exact error it produces
ok, so in the backend if I create a topic with a title of ‘test’ and this content
<table>
<tbody>
<tr>
<td>
hello
</td>
</tr>
</tbody>
</table>
Then it publishes all fine.
Does that work for you, and if so, can you give me exact steps to recreate problem.
Also able to edit that topic so changed hello to goodbye and it updated fine
THANK YOU! Such an easy fix. I unchecked theme support and everything is working! If it had been a snake it would have bit me! That’s what happens when you have spent 12 hours staring at code! LOL! Thanks @robin-w
Spent the better part of the day looking for a plug-in or code that supports mentions in BBPress topics and replies. I found lots of references to plugins that don’t work anymore and tried code that does work either.
Does anyone have viable alternatives.
Thanks
Thanks @robin-w, that is perhaps more stable than modifying the plugin code directly.
Until bbpress fixes this, the following code will correct
add_filter ('bbp_blacklist_keys' , 'rew_disallowed_keys') ;
function rew_disallowed_keys () {
$moderation = trim( get_option( 'disallowed_keys' ) );
return $moderation ;
}
If you are using
bbp style pack
a new version incorporating this fix will be released shortly and the fix will automatically be applied – with an option in bbPress bug fixes tab to turn that off if you don’t want it, or are using you own code
you are correct, and yes I had raised a ticket to fix that option when it was called blacklist_keys, but the wrong change was made
I have raised a new ticket to add it to the list, but bbpress releases new version at quite long intervals. (I am not a bbpress author)
In the meantime you can either leave your change in and make a note to refresh on new bbpress versions, or there are some hooks to skip moderation and maybe add a new version of the code – I’ll take a look at that soon
We had a rash of spam coming into our form today and we were confused because even after adding keywords in to the “Disallowed Comment Keys” in WordPress we were still seeing posts making it through to the forums that contained words we put into that list.
I think I found a bug in bbPress, and man, it must be rather longstanding… I found a post in the forum from about two years ago that talked about the reworking of the blacklist to using the disallow list [or that the name of the list had changed], and maybe this crept in at that time.
Here is the code:
bbpress/includes/common/functions.php:
866 // Strict mode uses WordPress “blacklist” settings
867 if ( true === $strict ) {
868 $hook_name = ‘blacklist’;
869 $option_name = ‘disallow_keys’;
In actuality, the key name in the options table is ‘disallowed_keys’.
I changed the code on our site and it seems to have stopped the flood. Would you take a look and see if I am correct about this? If not, please let me know and I will revert our copy and apologize for the false alarm. 🙂
Thanks!
Steve
sql not my strong suit, but that code looks as though it does all that it needs to.
I’m cleaning up an old abandoned forum…
It has over 60,000 members but few are real users and have written posts.
Is there a way to delete all users who have not written posts?
Chatgpt wrote me this script and it seems to have worked but if anyone has another safer and tested method I prefer it.
Thanks
DELETE u, um
FROM wp_users u
LEFT JOIN wp_usermeta um ON u.ID = um.user_id
LEFT JOIN wp_posts p ON u.ID = p.post_author AND p.post_type IN ('topic', 'reply')
WHERE p.ID IS NULL;
that is because Kadence does it’s own
you can take out kadence breadcrumbs using
.kadence-breadcrumbs {
display: none !important;
}
or the bbpress breadcrumbs using
#bbpress-forums .bbp-breadcrumb {
display: none !important;
}
Choice is yours !!
that should have worked, but never mind, try this
go to
dashboard>settings>bbp style pack>Custom CSS
and add this
#comments {
display: none !important;
}
it could be one of a few dozen reasons 🙂
At the moment your site is downloading 2 x bbpress.min.css to the browser together with one bbpress.css, so without soending a lot if time, it is hard to see what changes are in which.
Can you take out/deactivate your additional plugin and the custom css and then install
bbp style pack
once activated go to
dashboard>settings>bbp style pack>Custom CSS
and put the
#bbpress-forums {
width: 85% !important;
margin: 0 auto !important;
}
in there.
It it does not work, LEAVE that change active, and I may be able to see through the browser what is happening in the background
Hello, Robin, thank for your reply
I am sorry to tell you that it doesn’t work
I have done two things:
1)I have put your code in the custom CSS
2)I have done a plugin. I have copied the CSS file of bbPress iinto this plugin and, afterwards, have modified the next rows:
#bbpress-forums {
/*
background: transparent;
clear: both;
*/
background-color: yellow;
width: 85% !important;
margin: 0 auto !important;
/*
margin-bottom: 20px;
margin-bottom: 2px;
overflow: hidden;
font-size: 12px;
line-height: 18px;
*/
Please, tell what I am doing wrong
upgrade to the latest version of bbp style pack
dashboard>updates and select bbp style pack and update
then go to
dashboard>settings>bbp style pack>Custom CSS
and add this
.bsp-mark-all {
display : none ;
}
Wordpress: 6.8.1
bbPress: 2.6.13.
shortcode on my Forum page:
[bbp-single-forum id=846]
website: https://www.pcrnmra.net/redwood/
Forum page R.E.D. “Crew Lounge”
I would like to remove the “POST COMMENT” section on my Forum page (R.E.D. “Crew Lounge”).
In my Settings/Discussions page, I made sure that ALL of the boxes there are unchecked.
Is there a way to remove the “POST COMMENT”? section?
TIA
Wordpress: 6.8.1
bbPress: 2.6.13.
shortcode on my Forum page:
[bbp-single-forum id=846]
website: https://www.pcrnmra.net/redwood/
Forum page R.E.D. “Crew Lounge”
Is it possible to remove the “MARK ALL TOPICS AS READ” button?
TIA
This is working – the topic index shortcode you are using will show all tooics and then allow new topics with a forum select dropdown.
You are seeing that first.
After that you are seeing another ‘new topic’ box that says
Create New Topic in “R.E.D. Crew Lounge”
then you are also seeing and comment box.
so I would suggest you replace
[bbp-topic-index]
[bbp-topic-form forum_id=846]
with
[bbp-single-forum id=846]
That will then display the topics and only a reply to that forum
I would also turn off comments, you do that by
dashboard>settings>discussion>default post settings> and turn off all 3
That will stop it for new pages, then you need to go into
dashboard>pages>edit pages and the R.E.D. “Crew Lounge” page and find comments and turn it off