Robin W (@robin-w)

Forum Replies Created

Viewing 25 replies - 3,076 through 3,100 (of 14,247 total)
  • @robin-w

    Moderator

    🙂

    @robin-w

    Moderator

    ok, so when this happens

    – is it to just one person, the same person, different people, all people accessing the site
    – is the site unusable, does it freeze, or is it just if they try to do something ?

    @robin-w

    Moderator

    @mr18 – then suggestion is to either use this in a child theme functions file, which will not lose settings on a main theme update, or use code snippets, which does not change on a theme update.

    @robin-w

    Moderator

    very happy for you to mention it 🙂

    Adding the no-js class to the bbpress body is something that bbpress 2.6.8 introduced. This was I am presuming on the presumption that that js was never needed on bbpress pages which is not the case in you want the visual editor or quicktags on the text editor.

    I’m simply taking it out for bbpress pages as a first step for those that need it, ie remving the change in 2.6.8 and reverting to the absence that bbpress has used for 7 years. My presumption is that the visual editor will not work on browsers that do not support js, which as you say is a very small amount if any actually used nowadays !!

    anyway thanks for your clarification, let’s see what the bbpress authors do.

    @robin-w

    Moderator

    2.6.8 does not fix.

    so use either

    add_filter ('bbp_body_class', 'rew_unset_no_js') ;
    
    function rew_unset_no_js($classes) {
    	if (in_array ('single-forum', $classes) || in_array ('single-topic', $classes)) {
    		if (($key = array_search('no-js', $classes)) !== false) {
    			unset($classes[$key]);
    		}
    	}
    return $classes ;
    }

    or if that doesn’t work

    add_filter ('bbp_body_class', 'rew_unset_no_js') ;
    
    function rew_unset_no_js($classes) {
    	if (($key = array_search('no-js', $classes)) !== false) {
    			unset($classes[$key]);
    		}
    return $classes ;
    }

    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

    as far as I know this action is fired on ANY subscribe/unsubscribe

    // Do additional subscriptions actions
    	do_action( 'bbp_subscriptions_handler', $success, $user_id, $object_id, $action, $object_type );

    @robin-w

    Moderator

    the snippet I used takes it out before bbpress renders, @webcreations907 snippet does it after. Neither is right/wrong, and use whichever is better for you

    @robin-w

    Moderator

    which fix, style pack or the snippet above?

    @robin-w

    Moderator

    It’s not an error I’ve seen often.

    usually it would relate to url’s being wrong, but this would then apply to all your attempts.

    @robin-w

    Moderator

    the error is when the ‘nonce’ does not validate.

    https://codex.wordpress.org/WordPress_Nonces

    not sure what you can do about it, not my speciality 🙂

    @robin-w

    Moderator

    bbp-style-pack has a temporary fix in new version

    @robin-w

    Moderator

    @jjj Moving the ‘no-js’ class to the bottom of the ‘bbp_body_class’ function does not fix, as the quicktags toolbar is still not shown.

    the following filter fixes, but I’m not entirely sure what the introduction of then ‘no-js’ class to the function is doing, but I can’t see that the patch has any unintended consequences as it only runs on the relevant pages.

    add_filter ('bbp_body_class', 'rew_unset_no_js') ;
    
    function rew_unset_no_js($classes) {
    	if (in_array ('single-forum', $classes) || in_array ('single-topic', $classes)) {
    		if (($key = array_search('no-js', $classes)) !== false) {
    			unset($classes[$key]);
    		}
    	}
    return $classes ;
    }

    or if that doesn’t work

    add_filter ('bbp_body_class', 'rew_unset_no_js') ;
    
    function rew_unset_no_js($classes) {
    	if (($key = array_search('no-js', $classes)) !== false) {
    			unset($classes[$key]);
    		}
    return $classes ;
    }

    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

    FOR THOSE USING BBP-STYLE-PACK – I’ll issue a revised version incorporating this shortly until fixed in bbpress.

    @robin-w

    Moderator

    no quicktags are shown in 2.6.8, which is I think where the problem lies

    @robin-w

    Moderator

    ok, in my testing

    working :

    function bbp_enable_visual_editor( $args = array() ) {
        $args['tinymce'] = true;
        $args['quicktags'] = false;
        return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );

    not working

    function bbp_enable_visual_editor( $args = array() ) {
        $args['tinymce'] = true;
        return $args;
    }
    add_filter( 'bbp_after_get_the_content_parse_args', 'bbp_enable_visual_editor' );

    @robin-w

    Moderator

    🙂

    @robin-w

    Moderator

    🙂

    @robin-w

    Moderator

    stylepack is my plugin- I’ll need to take a look

    @robin-w

    Moderator

    ok, I can only suggest that you have some caching software – otherwise I’m out of ideas

    @robin-w

    Moderator

    ok, so check what changes in post and post meta for the topic itself?

    @robin-w

    Moderator

    ok, so exactly what in the database (post and post meta) changes when you update in wp_admin?

    @robin-w

    Moderator

    I’ve reported this to the authors

    @robin-w

    Moderator

    looks ok without testing – does it work ?

    @robin-w

    Moderator

    without a deep dive into your code and gravity, we’ll need to guess at answers.

    I presume you are not running any caching software?

    if not then you could tie a new reply to the action on submission.

    so if you have data, then the new_reply_handler in \includes\replies\functions.php starting at line 125 might be what you need.

    if you have $_POST data, then it might be as simple as

    add_action( 'whatever_your_actions_hook_is', 'bbp_new_reply_handler', 10 );

    @robin-w

    Moderator

    ok, so your form submission adds things to the metadata – yes ? or no ?

    just seeing if we need to update metadata or just run an update?

    Do you have the ability in gravity forms to link to an action on form submission ?

    @robin-w

    Moderator

    As far as I can see they are just there to allow for specific CSS changes if you wish, so suspect you can quite happily delete them. 🙂

Viewing 25 replies - 3,076 through 3,100 (of 14,247 total)