Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 2,276 through 2,300 (of 14,219 total)
  • @robin-w

    Moderator

    ok, I’ve found time to take an initial look at this.

    The function called looks at a database item which holds the sub forum count – but it looks like this is just count of public forums, so the count is zero, so none displayed.

    so removing looking at this takes away the issue.

    It would take a deal of work to see why and how to make a permanent fix to this, and I think this filter will do what you want

    
    add_filter('bbp_forum_get_subforums', 'rew_forum_get_subforums', 10, 3);
    
    function rew_forum_get_subforums( $sub_forums, $r, $args ) {
    
    	// Default return value
    	$retval = array();
    	
    	// Use passed integer as post_parent
    	if ( is_numeric( $args ) && ! empty( $args ) ) {
    		$args = array( 'post_parent' => bbp_get_forum_id( $args ) );
    	}
    
    	// Parse arguments against default values
    	$r = bbp_parse_args( $args, array(
    		'post_parent'         => 0,
    		'post_type'           => bbp_get_forum_post_type(),
    		'posts_per_page'      => get_option( '_bbp_forums_per_page', 50 ),
    		'orderby'             => 'menu_order title',
    		'order'               => 'ASC',
    		'ignore_sticky_posts' => true,
    		'no_found_rows'       => true
    	), 'forum_get_subforums' );
    
    	// Ensure post_parent is properly set
    	$r['post_parent'] = bbp_get_forum_id( $r['post_parent'] );
    	
    	
    	// Query if post_parent has subforums
    	if ( ! empty( $r['post_parent'] )  ) {
    		$get_posts = new WP_Query();
    		$retval    = $get_posts->query( $r );
    	}
    	// Filter & return
    	return (array) apply_filters( 'rew_forum_get_subforums', $retval, $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

    @robin-w

    Moderator

    This is not fully tested, but should work

    add_filter( 'bbp_get_reply_edit_url', 'rew_admin_link', 10 , 2 ) ;
    
    function rew_admin_link ($url, $reply_id ) {
    	if ( bbp_is_user_keymaster(get_current_user_id())) { 
    	$url = '/wp-admin/post.php?post='.$reply_id.'&action=edit' ;
    	}
    return $url ;
    }

    @robin-w

    Moderator

    great – glad you are fixed !!

    @robin-w

    Moderator

    contact me via

    Contact me

    @robin-w

    Moderator

    are you using any caching software? either plugin or Siteground?

    @robin-w

    Moderator

    ok, so your have downloaded it to your pc and are trying to install by doing what?

    (By the by, current version is 2.6.9, is there a reason why you want an old version?)

    @robin-w

    Moderator

    so are you trying to install this on a local WordPress installation, or an online website?

    @robin-w

    Moderator

    ๐Ÿ™‚

    @robin-w

    Moderator

    thanks, just tested with just bbpress and agree it does disappear.

    I had bbp private groups enabled, although no settings affecting, but with this it shows.

    I’ll try and take a look tomorrow (10pm in UK at the moment) to see what private groups does that is fixing that !

    @robin-w

    Moderator

    Alternatively, is there a way to post completely anonymously, but in a way that is available only for logged-in users?

    I think you’ve asked this before, but not sure I responded.

    It is technically possible, but lots of code and beyond free help. In any case I’d suspect that someone would post thinking it was anonymous, but forget to tick the box that says anonymous, or use the wrong form, and by mistake post something outrageous that then appears in their name, cue them accusing your site of destroying their reputation, you accusing whoever wrote the code of it not being robust, and all hell breaking loose. So not code that I would write.

    your other suggestion is also possible, but you’d need to catch everywhere the username is used, and again risk it being exposed in some code that isn’t expected.

    I s’pose my gut answer is just enable anonymous posting, and use the ‘hold for moderation’ in the moderation part of my style pack plugin to approve anonymous posts. Then tell your users that they must log out to post anonymously.

    In reply to: Edit Topic Page

    @robin-w

    Moderator

    ok, I’d suspect something in the way Divi is seeing urls with the topic in, but that’s just my guess.

    so once you’ve done the theme/plugin thing, come back with what you found out ๐Ÿ™‚

    @robin-w

    Moderator

    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

    @robin-w

    Moderator

    ok, my site after a post (and a sticky post also showing)

    http://www.rewweb.co.uk/wp-content/uploads/2019/07/Screenshot-2022-06-29-210816.png

    @robin-w

    Moderator

    ok, I just created that test scenario, and cannot replicate

    Once I post a topic in one of the sub-forums the list disappears below the category on forum index.

    can you post a screenshot please so that I can understand exactly what is disappearing

    In reply to: recaptcha and bbpress

    @robin-w

    Moderator

    not directly a bbpress plugin issue – might be better to post this into that plugins support forum

    https://wordpress.org/support/plugin/recaptcha-for-bbpress/

    In reply to: Edit Topic Page

    @robin-w

    Moderator

    ok, so presuming this is in any topic, then if you fancy sharing the shortcode you are using and the php code, I might take a look at that

    Outside of your php code, I’d suggest 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

    @robin-w

    Moderator

    never heard this in 7 years of supporting bbpress.

    so within bbpress it would be a deliberate action

    dashboard>tools>forums>reset forums

    But no idea if Learndash has something that hooks to this, say if you wanted to remove forums from learndash – might be worth asking them

    In reply to: Edit Topic Page

    @robin-w

    Moderator

    ok, so if you take out the site name, what is the url of a topic edit?

    @robin-w

    Moderator

    great – have a look at this as an additional plugin it adds many features – it also lists other bbpress plugins

    bbp style pack

    @robin-w

    Moderator

    I am not a bbpress author, but had been a moderator here for 7 or more years.

    bbpress continues to be maintained, but releases are generally not frequent.

    bbpress works with wordpress 6.x.

    bbpress is stable, indeed it is used by WordPress as the main support tool for plugins, themes and WordPress itself, and is written by some of the main WordPress contributors so complies with WordPress standards.

    There are many additional plugins for it which add functionality and design features – indeed several are written by me ๐Ÿ™‚

    @robin-w

    Moderator

    This is a WordPress error, usually associated with a failed nonce (short for ‘number once’).

    These nonce keys are generated for your website to verify that, for example, a script is run by you, and not an external source. This prevents intruders from altering or abusing your forms, URLs, AJAX calls, etc.

    amongst many times, a nonce will be generated when you land on a bbpress page with a form on it – eg a new topic or new reply form.

    This article explains possible causes

    fixing error

    In your case I’d suspect that this is not caused by a plugin or theme, but rather through expiration of the nonce through either other actions eg possibly you moving away from the page creating the nonce and then going back to it, or possibly a memory limit.

    I look at 2, 3 & 5 first

    @robin-w

    Moderator

    @robin-w

    Moderator

    ok, so it is sending but you are not receiving the email – yes ?

    @robin-w

    Moderator

    @robin-w

    Moderator

    bbpress just uses wordpress registration.

    I’d sugggest you check that your site is sending emails, there are lots of plugins that do this, but maybe using

    Check & Log Email

Viewing 25 replies - 2,276 through 2,300 (of 14,219 total)