Hello, I’m very excited to use BBPress on my website! My website already has a login form. So, I really need the login form removed from BBPress because for some reason it doesn’t work. After putting in the username and password it redirects to my login page where they have to re-enter the information.
The “Log in” button is “ok” since it directs to the login page. But, I would rather not have that either since I already have login button in my navigation.
I searched a few times on this over the last few days and even asked the plugin developers I’m using if they knew of a way to resolve this. I can’t find anything. I have Code Snippet plugin if someone wants to offer some code for that. Or is there some CSS that would just hide all that and remove the space it occupies?
Website is VeganLinked.com and there’s a link to forums in the very top navigation and footer.
Newest version of WP and BBPress.
You keep repeating the issue – I fully understand the issue.
1. I am not paid to do any of this – I try and spend around hour a day helping others as people have helped me over the years, but I have a full time job.
2. I have bbpress and 6 other plugins that I try to help.
3. I receive 30-40 emails a day on many things, and I do not keep old emails.
4. If I had access to your site a. I would have deleted any details b. It is not up to me to get you site working, if I ask you for details I do not expect to have to look them up myself.
so if you are running both my plugin and adding snippets you are very unlikely to get to any solution. Consider my plugin to be blue paint, and you snippet to be red paint. If you run both, the room you want to paint might end up red because that is the only color that got painted, or red because it was pained blue first and then painted red. Only by having one bit of code running do you get a true test.
so to fix your site.
1. do not have any other attempts at solutions
2. use the auto login in my style pack
3. tell me if it works in staging – ie it goes to login and then to the topic
4. tell me if it works in live – – ie it goes to login and then to the topic
5. tell me the settings you have in
dashboard>settings>bbp style pack>plugin information>subscription emails
copy/paste here or send to me by email
for both live and staging
If you do not understand what this means, the use google to translate or find someone who can understand this.
Added @contemplate’s solution to bp-custom.php
, time has broken something as there is now no change in behaviour.
that code will do nothing useful, but i do not intend to spend time on other peoples solutions.
The bbp style pack plugin contains the solution, but until you tell me how you have it set up, and give me consistent answers as to what it works on and doesn’t work on I cannot help further
Ce code ne servira à rien, mais je n’ai pas l’intention de passer du temps sur les solutions des autres.
Le plugin bbp style pack contient la solution, mais jusqu’à ce que vous me disiez comment vous l’avez configuré et que vous me donniez des réponses cohérentes sur ce sur quoi il fonctionne et ne fonctionne pas, je ne peux pas vous aider davantage
Hi!
I have just installed bbPress, configured the settings, and created some categories/forums, but when I go to the link where the forum should have been, I only see a blank page.
I have tested with the shortcode, and added that to a blank page. That works, but links to posts and categories open up as blank pages
yes Robin,that was a mistake. Sorry for this confusion. They both work similar.
I also tried to put forums public + snippet to redirect visitors to login.
But the result is exactly the same. After login there is no redirect to the topic.
here is the snippet if you are curious :
/**
* Redirect bbPress pages for visitors
*/
function yzc_redirect_bbpress_to_login_page() {
if ( ! is_user_logged_in() && ( function_exists( 'is_bbpress') && is_bbpress() ) ) {
// Set Redirection Url
$redirect_url = 'https://www.website.com/login';
wp_redirect( $redirect_url );
exit();
}
}
add_action( 'template_redirect', 'yzc_redirect_bbpress_to_login_page' );
Do you think possible to redirect to private topic after login ?
regards
Hi all,
I’m having white pages issue while I setup a very simple forum on that testing sub-domain:
https://greensquare.c-serp.fr/
https://greensquare.c-serp.fr/forums/
https://greensquare.c-serp.fr/forums/forum/gestion-de-la-copro/
My current configuration
– WordPress: 6.5.2 – multi-site
– PHP/MySQL: 7.4.30 / 5.5.5
– Theme: TwentyTwentyFour Child
– Enabled extensions: bbPress (2.6.9), WordPress Importer (0.8.2)
– Enabled network extensions: Comet Cache (170220), Error Log Monitor (1.7.7), Fixed Widget (6.2.3), Forum_wordpress_fr (4.2), Solid Security Basic (9.3.2), WP-Sweep (1.1.8), WP Dashboard Notes (1.0.11)
I’ve read several topics including that one (https://wordpress.org/support/topic/blank-topic-pages-on-bbpress-while-using-twenty-twenty-two-theme/) I’ve put the code in my functions.php child, but it didn’t get any better. (I removed it)
But, I’m not too good at geek things, so I’ll appreciate any advices, clues if you read that topic, so I can enjoy testing bbPress extension.
Cheers.
you would need to add this to your additional/custom css
/*topic titles*/
.bbpress .forum-titles {
overflow: hidden;
}
.bbpress .forum-titles .bbp-topic-voice-count::before,
.bbpress .forum-titles .bbp-topic-reply-count::before {
font: 400 16px/1 dashicons;
margin-right: 100px;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
.bbpress .forum-titles .bbp-topic-voice-count::before,
.bbpress .forum-titles .bbp-topic-reply-count::before {
font: 400 21px/1 dashicons;
margin-left: 20px;
}
.bbp-topic-voice-count {
display: none;
}
.bbpress .forum-titles .bbp-topic-voice-count::before {
content: "\f307";
}
.bbpress .forum-titles .bbp-topic-reply-count::before {
content: "\f125";
}
.bbpress li.bbp-header li.bbp-forum-info,
.bbpress li.bbp-header li.bbp-topic-title {
text-align: left !important;
}
and then amend loop-topics.php as foillows
find
wp-content/plugins/bbpress/templates/default/bbpress/loop-topics.php
transfer this to your pc and edit
<li class="bbp-topic-voice-count"><?php esc_html_e( 'Voices', 'bbpress' ); ?></li>
<li class="bbp-topic-reply-count"><?php bbp_show_lead_topic()
? esc_html_e( 'Replies', 'bbpress' )
: esc_html_e( 'Posts', 'bbpress' );
?></li>
to
<li class="bbp-topic-voice-count"></li>
<li class="bbp-topic-reply-count"></li>
and save
create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpress
where %your-theme-name% is the name of your theme
Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/loop-topics.php.php
bbPress will now use this template instead of the original
Hi Robin! so sorry for the late reply. Hope you enjoyed your holiday. I was switching hosting plans. I moved from shared hosting to vps hosting. Also, I changed the wording for the buttons in the forum button section of your style pack. Since I started my website over, I am not sure what code I used to change the subscriptions name section in the profile page.
add_filter ('bbp_get_statistics', 'rew_count_forums' , 10 , 3) ;
function bsp_count_forums ($statistics, $r, $args ) {
//fix counts for forums to show private forums if user can read them and not error if site is only private forums
// forums
if ( ! empty( $r['count_forums'] ) ) {
$private = bbp_get_private_status_id();
$all_forums = wp_count_posts( bbp_get_forum_post_type() );
// Published (publish)
$forums['publish'] = $all_forums->publish ;
$forums['private'] = 0 ;
if ( current_user_can( 'read_private_forums' ) ) {
// Private
$forums['private'] = $all_forums->{$private} ;
}
//now add the two
$statistics['forum_count'] = $forums['publish'] + $forums['private'] ;
$statistics['forum_count_int'] = $statistics['forum_count'] ;
}
// Filter & return
return (array) apply_filters( 'bsp_count_forums', $statistics, $r, $args );
}
Hi Robin,
thank you so much for your work, here is where I am :
. no more warning Forums
. but count was double ; Tell 20 when there is 10 forums…
I checked and it was because I had a previous snippet ; when I disable that one, your code seems to be well working. Here is the previous one (made because without it only public forums were counted). Can you confirm please I can delete it and keep only yours ?
`function bbpress_include_private_posts_count($statistics, $r, $args){
if( isset($statistics[‘forum_count’]) ){
$private = wp_count_posts(“forum”)->private;
if( !empty($private) ){
$statistics[‘forum_count’] = $private + $statistics[‘forum_count’];
}
}
return $statistics;
}
add_filter(‘bbp_get_statistics’, ‘bbpress_include_private_posts_count’, 999, 3);
can you try
add_filter ('bbp_get_statistics', 'rew_count_forums' , 10 , 3) ;
function rew_count_forums ($statistics, $r, $args ) {
//fix counts for forums to show private forums if user can read them and not error if site is only private forums
// forums
if ( ! empty( $r['count_forums'] ) ) {
$private = bbp_get_private_status_id();
$all_forums = wp_count_posts( bbp_get_forum_post_type() );
// Published (publish)
$forums['publish'] = $all_forums->publish ;
$forums['private'] = 0 ;
if ( current_user_can( 'read_private_forums' ) ) {
// Private
$forums['private'] = $all_forums->{$private} ;
}
//now add the two
$statistics['forum_count'] = $forums['publish'] + $forums['private'] ;
}
// Filter & return
return (array) apply_filters( 'rew_count_forums', $statistics, $r, $args );
}
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
yes it is, the [bbp-stats] shortcode…
My idea is just to communicate URL of this page to moderators whose role is more to facilitate trade than to control it (2/3 members in the private of a fellow workers’ group).
That way they could easily,simply and clearly get an overview of the forums…
in that way, I would say it is more appropriate just logged in…
Isn’t that what it’s supposed to do?
Honestly not a bit of code I’ve looked at in 10 years. I am presuming this is the [bbp-stats] shortcode that is doing this? and if so do you want to show this to all users, or just logged in ?
GDPR is less difficult to interpret than say the stateside ‘can-spam’ regs.
according to
https://gdpr.eu/email-encryption/#:~:text=And%20you%20must%20also%20make,is%20it%20violating%20the%20GDPR.
‘And you must also make it easy for people to change their mind and opt-out. Only if a marketing email does not present the option to unsubscribe, is sent to someone who never signed up for it, or does not advertise a service related to one the receiver uses is it violating the GDPR.’
Can-spam is much less clear.
Having a “unsubscribe from this forum/topic” link?” should be doable, but I’d not do this for free, as it is a bunch of code I’d need to work out, as it would need to fire code from a webiste link, probably using a unique code – lots of work.
Unless you are using the plugin or bespoke code to load that template, I fail to see how that can be, the error quotes a file within Youzify
plugins/youzify/includes/public/templates/bbpress/content-statistics.php on line 33
but quite happy for you to pursue as you feel fit
the warning is
Warning: Undefined array key “forum_count” in /home/clients/3db470ac3c186374a924a94534df90ab/sites/test.com/wp-content/plugins/youzify
which says the undefined array key is in the plugin youzify
sorry I cannot help further
I just installed the follow for bbpress plugin, and I have received four warnings about the coding on lines 36, 38, 42, and 44. I have not altered anything. This messaged popped up upon going to setting. I am not sure what to do to get rid of it. Below is what the error message says:
Warning: Trying to access array offset on value of type bool in /home/noisvjkg/public_html/wp-content/plugins/follow-bbpress/setting.php on line 36
Warning: Trying to access array offset on value of type bool in /home/noisvjkg/public_html/wp-content/plugins/follow-bbpress/setting.php on line 38
Warning: Trying to access array offset on value of type bool in /home/noisvjkg/public_html/wp-content/plugins/follow-bbpress/setting.php on line 42
Warning: Trying to access array offset on value of type bool in /home/noisvjkg/public_html/wp-content/plugins/follow-bbpress/setting.php on line 44
I used “inspect” in Chrome and the img code looked okay but http.
I copied the image URL (http) to a separate window and it worked.
In Inspect I copied the URL of an image from another thread in the site (Https) with an image which worked and it still worked.
I the copied the URL of an image from another HTTPS site that I manage and it showed.
So my assumption is that it is the http image within an Https page is making it fail to display.
Thanks for joining!
I am not a bbpress author, just someone who helps out.
Yes, I suspect that there are several places it could be done.
My code above should work (and if you can test it that would be great) , but if you fancy working up a better solution, please post back.
I will happily incorporate it into my bbp-style-pack plugin to save others needing to work out code and/or use child theme functions.
Hi, allow me to join in. I am Martin’s collegue and we are dealing with this issue together.
I went into the code to see how this works. The problem is that after spam is checked using bbp_new_reply_pre_insert filter currently on line 379 in includes/replies/functions.php, the wp_insert_post runs, which is fine, but a few lines later the hook bb_new_reply hooks the function bbp_new_reply that takes care about all the extra metadata non related to the post but to various counts and date updates. However if we have spam, this function should probably not run.
I guess we should unset this action if spam is found. Do you think this can be done using the bbp_akismet_check_post filter?
We’re currently working on integrating forums into our Community page. However, despite embedding the necessary shortcodes, we’re encountering an issue where the forums page loads correctly, but clicking on specific forums or topics results in blank pages. We’ve attempted to troubleshoot by uninstalling, but the problem persists.
Here’s our forum page https://membership.nationalhomeless.org/community/
Blank page: here:https://membership.nationalhomeless.org/forums/topic/welcome-members/
I don’t have any forums on my live sites (anymore), so don’t use akismet, so I’m relying on your better knowledge 🙂
so to save having to repeat bbpress code, the logic might be
add_action ('bbp_new_reply_pre_extras' , 'rew_askimet_check', 100 , 1 ) ; //might need to be run at a high priority to make sure it is last - not tested
function rew_askimet_check ($reply_id) {
//only execute is this is akismet spam
if ( bbp_get_spam_status_id() == get_post_status($reply_id) && !empty (get_post_meta( $reply_id, '_bbp_akismet_user_result', true ))) {
//unspam the reply (which takes it back to pending, and within that function runs the update_reply_walker)
bbp_unspam_reply( $reply_id) ;
//and then re-spam it
bbp_spam_reply( $reply_id) ;
}
}
which is actually what I do manually (I click unspam and then click spam on the front end admin) on this site when akismet does this.
I apologise for the late response, I was distracted by another urgent issue. So if my understanding is correct, this basically just reruns the bbp_update_reply_walker if the reply is flagged by spam. But from what I’ve seen in the code, this wouldn’t solve the specific issue, since the walker only checks for the replie’s pending status
As in:
// Only update if reply is published
if ( ! bbp_is_reply_pending( $reply_id ) ) {
// Last reply and active ID's
bbp_update_topic_last_reply_id ( $ancestor, $reply_id );
bbp_update_topic_last_active_id( $ancestor, $active_id );
// Get the last active time if none was passed
$topic_last_active_time = $last_active_time;
if ( empty( $last_active_time ) ) {
$topic_last_active_time = get_post_field( 'post_date', bbp_get_topic_last_active_id( $ancestor ) );
}
bbp_update_topic_last_active_time( $ancestor, $topic_last_active_time );
}
But the specific reply, if it has been marked by Akismet would have the status ‘spam’ and not ‘pending’, so the walker would still update the value wrong. Is my understanding correct?