So as of approximately 10:30pm Sunday night the last reply was posted to my website jamiepine.com/forums. Users of my site were unable from that point on to post replies to any topic in any forum on my site.
It allows them to write their reply, then upon clicking submit, the page reloads and the reply isn’t there. I’ve spent over 13 hours trying to find something that could be causing a conflict or error that would prevent replies being created. Here’s what I’ve tried so far:
– I’ve disabled ALL plugins aside from bbPress
– I’ve disabled the my theme (switched to TwentyTwelve, TwentyThirteen and TwentyFourteen)
– I’ve done both of the above at the same time & on their own
– I’ve disabled Cloudflare (my CDN / cache service) [it’s still disabled]
– I’ve updated all plugins and themes
– I’ve typed every possible phrase relating to this problem into Google in effort to find answers
– I’ve inspected the database to the best of my knowledge**
**I’ve noticed bbPress is creating many revisions of old replies from last year even when the site was in maintenance mode and no users were able to access. I was also receiving an email telling me I’d received a new reply to my topics (from 2014) when I wasn’t even touching the site. It’s essentially gone senile.
I’d list all my plugins, but my problem is I’ve changed nothing before 10:30PM that Sunday other than adjusting plugin settings in WP Super Cache, which is now disabled. In fact I know the pages aren’t cached because I can update anything else on these pages and create new topics; I just can’t reply.
My theme clearly isn’t the problem as it’s still broken at a core level; but it is my own child theme of Canvas.
The only thing I can think of is that I installed a plugin called bbPress AJAX replies a few hours prior to the problem, but that plugin did nothing of use anyway so I removed it straight away. I also inspected the code and didn’t find anything that would cause a lasting effect on the site, no database communications of any nature.
…But it looks to be a database issue?
This has caused me no end of headache and I’d greatly appreciate some help, I’ll provide you with any details you need / admin login to the site. I have hundreds of users waiting to use the site.
Thanks in advance,
Jamie
I registered a new rest endpoint and wrote functions to retrieve all the replies with the code below. Although the code works, I’m not really happy with it because I’m not able utilize built in filtering (i.e. paged, order, posts_per_page… etc). This code is not optimize because it has no pagination and will retrieve all replies at once (can be bad if there are thousands of records).
function ldp_get_topic_replies( $data ) {
$topicID = $data['id'];
// Get an array of all replies belonging to a specific topic
$repliesID = bbp_get_all_child_ids($topicID, bbp_get_reply_post_type());
$response = array();
foreach ($repliesID as $replyID) {
$response[] = ldp_get_topic_reply($replyID);
}
return $response;
}
function ldp_get_topic_reply( $replyID ) {
$reply = array(
'author_name' => bbp_get_reply_author_display_name($replyID),
'author_email' => bbp_get_reply_author_email($replyID),
'author_url' => bbp_get_reply_author_url($replyID),
'author_avatar' => get_avatar_url(bbp_get_reply_author_id($replyID)),
'link' => bbp_get_reply_url($replyID),
'reply_to' => bbp_get_reply_to( $replyID ) == 0 ? NULL : bbp_get_reply_to( $replyID ),
'topic_title' => bbp_get_reply_topic_title($replyID),
'meta' => bbp_get_reply($replyID),
);
return $reply;
}
Hi Pascal, thanks the these links. However those addressed the problem seen in WP REST Api version 1 and version 2 is the refactor code for WP REST API which will eventually go into WordPress Core. Version 2 is what I’m using and it doesn’t work as explain in those blog.
I’ve changed the loop-single-forum.php template file so that the frontpage contains all the forums on a single page. It look like this.
I’m also trying to implement a plugin called bbPress Unread Posts v2. It’s placing an icon before every forum title to notify the user when new posts/topics have been made in a forum.
As you can see in the template I’m firing bbp_list_forums() to list the forums. However this function does not fire the action bbp_theme_before_forum_title which means a plugin won’t affect these lists of forums.
I can imagine I need a manual way to list all forums so I can fire a do_action. But how would I be able to do that?
216000000 ? How many replies you had ???
It seems that SQL will be your only option them. After running the SQL, repair/reset the forums to be sure.
USE WITH CAUTION, MAKE SURE TO HAVE A BACKUP OF THE DB.
DELETE a,b,c FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID=b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID=c.post_id)
WHERE a.post_type IN ('forum', 'topic', 'reply')
Create a custom view instead.
Add this php code snippet into your functions.php file in your child theme or in a functionality plugin.
function rkk_register_custom_views() {
bbp_register_view( 'viewid', __( 'View Name' ), array( 'topic-tag' => 'tag1, tag2' ) );
}
add_action( 'bbp_register_views', 'rkk_register_custom_views' );
Then you can put this shortcode in a page.
[bbp-single-view id=”viewid”]
If it is there then that is when you are going to use bbPress hooks and filters. Since I see how you are doing it, only thing I can suggest possibly filtering the topic index shortcode, using a custom template for the layout, and just listing the last few replies right under. I am sure what you are doing is possible though. Try to learn the best you can from bbPress’s code and create the functionality you want.
I think as far as wordpress can go is, but you have to create a custom folder in the uploads directory.
<img src="/wp-content/uploads/images/image.png" />
And possibly this if you have the images in your theme.
<img src="/wp-content/theme/images/image.png" />
You have to have all these images on your site for it to work.
It might be possible to change the image source, but it might depend on how you are sending this data to bbPress.
Tell me exactly what you are trying to do. It kind of sounds like you just want to borrow code from bbPress and use it somewhere else.
Are you trying to create a function that is related to the bbPress plugin and other WordPress pages??
Oh yeah no problem.
Here is a couple things I found when visiting your site.
The first item in your forum index is a little off because of the bbPress breadcrumbs.
Adding this CSS will help.
div.bbp-breadcrumb {
width: 100%;
}
There is an issue with the Freshness column text not really displaying right.
#bbpress-forums p.bbp-topic-meta {
text-align: inherit;
}
Hi,
If you look for features image, I did not try it myself yet, but somebody seem to has found something:
https://wordpress.org/support/topic/new-post-featured-image-section-not-showing-after-bbpress-code?replies=2
Hope it helps.
Pascal.
I created a new page, I added the shortcode, I choose the template with no sidebar on the page I created, and bbpress just ignores it completely. I also tried a suggestion in another post about adding code to the style.css but that didn’t work as I was never very good with css. The wordpress theme I am using is called point and can be found here: https://wordpress.org/themes/point/
If anyone could perhaps nudge me in the correct direction I would appreciate it, thanks.
You need custom code. This is the custom code you will need to display it in your forums. Place it in your functions.php file, bbpress-functions.php file, or in a functionality plugin.
function rkk_mentionname_in_bbp() {
$user = get_userdata( bbp_get_reply_author_id() );
if ( !empty( $user->user_nicename ) ) {
$user_nicename = $user->user_nicename;
echo "@".$user_nicename;
}
}
add_action( 'bbp_theme_after_reply_author_details', 'rkk_mentionname_in_bbp' );
add_action( 'bbp_theme_after_topic_author_details', 'rkk_mentionname_in_bbp' );
@mei-ling
Thanks for sharing!!
This is exactly like what I said earlier. I will need to check this out and see if it needs more improvements in the code, and create a patch for bbPress if in the ticket.
Great. Thanks for letting me know. I’ll investigate further about Apache cache.
I had this in my htaccess, but this doesn’t comprehend php files:
<filesMatch "\.(html|htm|js|css)$">
FileETag None
<ifModule mod_headers.c>
Header unset ETag
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
</ifModule>
</filesMatch>
So, nice to know you solved it. And thanks the other users for helping.
I notice user’s hashtags appear here under the user’s name and avatar. I’d like to achieve the same functionality. Is this a plugin, a feature I haven’t noticed, or custom code?
Hi.
there is any way to creat in the bar the where the “img” code etc… some kind of icons?
Hi,
Here is the code that we use with the child theme. As we run a large forum, we must modify some setting of the server but we use a VPS.
<?php
add_action( 'bulk_edit_custom_box', 'manage_wp_posts_be_qe_bulk_quick_edit_custom_box', 10, 2 );
function manage_wp_posts_be_qe_bulk_quick_edit_custom_box( $column_name, $post_type ) {
switch ( $post_type ) {
case 'topic':
switch( $column_name ) {
case 'bbp_topic_forum':
?><fieldset class="inline-edit-col-left">
<div class="inline-edit-col">
<label>
<span class="title">Deplacer dans le forum</span>
<span class="input-text-wrap">
<select name="deplacer">
<option value="Null"></option>
<?php /* recuperation des forums "forum" */
$args = array(
'post_parent__not_in'=> array( 0 ) ,
'post_type' => 'forum'
);
$forums = new WP_Query( $args );
// boucle forum
if ( $forums->have_posts() ) {
while ( $forums->have_posts() ) {
$forums->the_post();
echo '<option value="'.$forums->post->ID.'">'.get_the_title() . '</option>' ;
}
}
wp_reset_postdata();?>
</select>
</span>
</label>
</div>
</fieldset><?php
break;
}
break;
}
}
/* lance le javascript */
add_action( 'admin_print_scripts-edit.php', 'manage_wp_posts_be_qe_enqueue_admin_scripts' );
function manage_wp_posts_be_qe_enqueue_admin_scripts() {
wp_enqueue_script( 'manage-wp-posts-using-bulk-quick-edit', trailingslashit( get_bloginfo( 'stylesheet_directory' ) ) . 'js/bulk_quick_edit.js', array( 'jquery', 'inline-edit-post' ), '', true );
}
/* enregistre modif forum et repare */
add_action( 'save_post', 'save_deplacer');
function save_deplacer() {
global $wpdb;
if( $_GET['post_type']='topic' && $_GET['bulk_edit']='Mettre à jour'){
$post_ids= $_GET['post'];
$forum_id = $_GET['deplacer'];
foreach($post_ids as $post_id){
$wpdb->query("UPDATE wp_posts SET post_parent = $forum_id WHERE ID = $post_id ");
}
$messages = array();
$messages[] = bbp_admin_repair_forum_meta();
// $messages[] = bbp_admin_repair_topic_meta();
$messages[] = bbp_admin_repair_freshness();
// $messages[] = bbp_admin_repair_reply_menu_order();
$messages[] = bbp_admin_repair_forum_topic_count();
$messages[] = bbp_admin_repair_forum_reply_count();
// $messages[] = bbp_admin_repair_topic_reply_count();
// $messages[] = bbp_admin_repair_topic_voice_count();
// $messages[] = bbp_admin_repair_user_topic_count();
// $messages[] = bbp_admin_repair_user_reply_count();
$messageori = sprintf( _n( 'Topic déplacé.', '%s topics déplacés.', $_REQUEST['deplacer'] ), number_format_i18n( $_REQUEST['deplacer'] ) );
foreach ($messages as $message){
echo'<div class=\"updated\"><p>'.$message[1].'</p></div>';
}
echo "<div class=\"updated\"><p>{$messageori}</p></div>";
}
}
?>
Do you think this is a right way? Is there a way to improve it?
I thank you in advance
Regards
Mei Ling
Hello,
I’m working on an application what communicate to bbPress using RESTful API. I’m struggling to find an equivalent function that would output the nested/threaded topic replies into a data structure such as array or JSON format. I see that bbp_list_replies() does just what I wanted, but rather than putting the result inside a data structure, this function displays the output as HTML data. Is there a function which will accomplish my description above or is this something I’ll have to write up?
Many thanks.
Inside bbpress/templates/default/bbpress-functions.php
yes that one.
You can place a copy of the file right into your child theme and customize it from there.

You can do the same thing for the other files in bbPress too.
Theme Compatibility
use my code it functions but please Read Carefully
@reminisce32
Stick with purging the installation there, but it has worked for a user by just using sql code.
@hayleyadanner
Go into a single forum by selecting a forum in the forum list in the left sidebar or go to this url and create a topic.
Create New Topic
I can’t get this to work. That go in the theme’s stylesheet? I’m still getting the pesky sidebar. I’ve tried everything, read tons of posts, Why isn’t “hide sidebar” a standard option? It’s like going into a coffee shop and them telling me there is no milk or sugar to put in my coffee. lol, sorry for being sarcastic this is just very stressful.
I created a new page, I added the shortcode, I choose the template with no sidebar on the page I created, and bbpress just ignores it completely. Is that code meant to go in the bbpress css file, that makes no sense to me since it’s a plugin. Maybe it’s the theme I’m using.
I am standing up a forum for posting backgammon positions.
The two commonly used pieces of backgammon software export html board positions
using a relative path to an images file. i.e

How do I make bbpress think that this folder structure exists and point it to a folder with these gifs in it? I have been searching all over the place and haven’t been able to find a clear answer.
Thanks,
Robert
<!-- Score -->
<strong>Match to 5 points - gnubg 0, Robert 0</strong>
<!-- End Score -->
<!-- Board -->
<table style="page-break-inside: avoid"><tr><th align="left">gnubg</th><th align="right">167</th></tr><tr><td align="center" colspan="2"><img src="../Images/n_high.gif" style="vertical-align: bottom" alt="" /><br />
<img src="../Images/o_w_0.gif" style="vertical-align: top" alt="" /><img src="../Images/p_up_b_2.gif" style="vertical-align: top" alt="2O" /><img src="../Images/p_ud_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_up_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_ud_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_up_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_ud_w_5.gif" style="vertical-align: top" alt="5X" /><img src="../Images/b_up_0.gif" style="vertical-align: top" alt="" /><img src="../Images/p_up_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_ud_w_3.gif" style="vertical-align: top" alt="3X" /><img src="../Images/p_up_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_ud_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_up_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_ud_b_5.gif" style="vertical-align: top" alt="5O" /><img src="../Images/c_up_0.gif" style="vertical-align: top" alt="" /><br />
<img src="../Images/b_center.gif" style="vertical-align: top" alt="" /><img src="../Images/c_center.gif" style="vertical-align: top" alt="" /><br />
<img src="../Images/o_b_0.gif" style="vertical-align: top" alt="" /><img src="../Images/p_dd_w_2.gif" style="vertical-align: top" alt="2X" /><img src="../Images/p_dn_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_dd_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_dn_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_dd_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_dn_b_5.gif" style="vertical-align: top" alt="5O" /><img src="../Images/b_dn_0.gif" style="vertical-align: top" alt="" /><img src="../Images/p_dd_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_dn_b_3.gif" style="vertical-align: top" alt="3O" /><img src="../Images/p_dd_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_dn_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_dd_0.gif" style="vertical-align: top" alt=" '" /><img src="../Images/p_dn_w_5.gif" style="vertical-align: top" alt="5X" /><img src="../Images/c_dn_0.gif" style="vertical-align: top" alt="" /><br />
<img src="../Images/n_low.gif" style="vertical-align: top" alt="" /></td></tr>
<tr><th align="left">Robert</th><th align="right">167</th><th align="center" colspan="2"></th></tr><tr><td align="center" colspan="2"><span style="font-size: 75%; color: #787878">Position ID: <tt>4HPwATDgc/ABMA</tt> Match ID: <tt>cAmgAAAAAAAA</tt><br /></span></td></tr></table>
<!-- End Board -->
<p>• Robert doubles</p>
<!-- Epilogue -->
<!-- Output generated by GNU Backgammon 1.04.000-mingw 20141021 (http://www.gnu.org/software/gnubg/) (HTML Export version 1.235) -->