Skip to:
Content
Pages
Categories
Search
Top
Bottom

HTML editor doesn’t appear on bbpress 2.6.7


  • OSCOWP
    Participant

    @oscowordpress1

    Since I updated to 2.6.7 only appears now the visual but not the HTML…

    WHY?

Viewing 25 replies - 1 through 25 (of 54 total)

  • KevinPlusPlus
    Participant

    @kevinplusplus

    Hi,

    Yes, the same thing happened to us. It looks like it is because of line 971 in common/templates.php

    $bbp_classes = array( ‘no-js’ );

    Remove the no-js and the editor will come back.

    I don’t see any way to do this without directly editing the source code for the plugin. Hopefully an oversight that can be corrected.

    Kevin


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Going to release 2.6.8 today to fix this. Sorry everyone!


    KevinPlusPlus
    Participant

    @kevinplusplus

    John,

    Thanks for your fast action, unfortunately the issue still persists. The Visual editor does not appear.

    If I comment out line 1085:

    //$bbp_classes[] = ‘no-js’;

    Then it will appear again.

    Or, do I need to be defining this bbp_classes array somewhere else?

    Thanks,

    Kevin


    OSCOWP
    Participant

    @oscowordpress1

    Same here, its not fixed


    John James Jacoby
    Keymaster

    @johnjamesjacoby

    Can you please post the code snippet you are using to enable the visual editor?

    In my testing, it is working OK using these snippets:

    Enable Visual Editor


    OSCOWP
    Participant

    @oscowordpress1

    We enable it using bbpress style pack plugin.

    It did work before and since 2.6.7 it isn’t.


    OSCOWP
    Participant

    @oscowordpress1

    And apparently we are not only the once we are having the same issue with 2.6.7-8


    Robin W
    Moderator

    @robin-w

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


    OSCOWP
    Participant

    @oscowordpress1

    Check it out please, I have enabled both editor but I only see the visual one we dont have the option to change to html


    KevinPlusPlus
    Participant

    @kevinplusplus

    I have this in my functions.php:

    /* Re-enable the visual editor for bbPress */
    add_filter( ‘bbp_after_get_the_content_parse_args’, ‘bbp_enable_visual_editor’ );

    function bbp_enable_visual_editor( $args = array() ) {
    $args[‘tinymce’] = true;
    $args[‘teeny’] = false;
    return $args;
    }

    I should add that with the 2.6.7/8, the text editor doesn’t even show the toolbar. All I get is the text window with no buttons at all.


    Robin W
    Moderator

    @robin-w

    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' );

    OSCOWP
    Participant

    @oscowordpress1

    any fix coming soon?


    Robin W
    Moderator

    @robin-w

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


    OSCOWP
    Participant

    @oscowordpress1

    Exactly, people can’t choose if they want to use the html or visual


    Robin W
    Moderator

    @robin-w

    @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

    @robin-w

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


    OSCOWP
    Participant

    @oscowordpress1

    the fix is not working in our website.


    Robin W
    Moderator

    @robin-w

    which fix, style pack or the snippet above?


    webcreations907
    Participant

    @webcreations907

    When no-js is used, it’s usually removed using javascript or jquery to check if the browser supports it as some people turn it off in there browser preferences.

    Try adding the below code to your functions.php or code snippet plugin, etc.

    
    if( !function_exists( 'bbpress_browser_supports_js' ) ){
    	function bbpress_browser_supports_js() {
    		echo '<script>document.body.classList.remove("no-js");</script>';
    	}
    	add_action( 'wp_footer', 'bbpress_browser_supports_js' );
    }
    

    Make sure to clear any caches and check to see if it works for you.


    KevinPlusPlus
    Participant

    @kevinplusplus

    Webcreations907,

    This code snippet added to my functions.php does then show the Text / Visual tabs and allow switching between them.

    Not sure if that’s the permanent solution, but that does get things working without modifying the plugin code itself.

    Kevin


    webcreations907
    Participant

    @webcreations907

    That’s good, glad that worked out for you.

    You could also put it in bbpress.php in the plugin itself, then when the fix comes out and the plugin is updated it would get rid of it.

    For others looking for a solution, I tried to edit my post above but couldn’t, when I mentioned functions.php I mean the functions.php file that is within your current active WordPress theme.


    Robin W
    Moderator

    @robin-w

    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


    mr18
    Participant

    @mr18

    Hey!
    After updating to version 2.6.8, it also stopped working for us visual editor.
    Please solve the problem and return to the forum visual editor.
    Thanks!


    lisabeavers
    Participant

    @lisabeavers

    I am also using bbpress and have the same problem – the html bar for replies, etc. has completely disappeared for my users. I am on version 2.6.8 and it has not solved the problem. Help! (Please and thank you). I have checked everything and can’t find a single reason for it to be happening on my site. Everything was working great a few days ago.


    Robin W
    Moderator

    @robin-w

    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

Viewing 25 replies - 1 through 25 (of 54 total)
  • You must be logged in to reply to this topic.
Skip to toolbar