WordPress.org

Ready to get started?Download WordPress

Forums

bbPress Quotes
does not work with latest vs. (9 posts)

  1. Anointed
    Member
    Posted 2 years ago #

    Using nightly 3.3beta2 of wp, and also the new 2x bbpress which includes the new editor.

    The quotes plugin broke, always says 'uh oh something went wrong'

    this is probably due to the new wp editor in bbp

    http://wordpress.org/extend/plugins/bbpress-quotes/

  2. chrisella
    Member
    Posted 2 years ago #

    Hey anointed,
    I had the same problem,
    I rooted around in bbPress-Quotes and found the offending code and changed it to make it work. If I can contact the author I can show him the fix:

    To Fix you need to:
    In bbpress-quotes.php:
    on Line 86 : Change wp_register_script('bbpress_quotes_js', ($plugin_url . '/bbpress-quotes.js'), false, '1.0');
    TO
    wp_register_script('bbpress_quotes_js', ($plugin_url . '/bbpress-quotes.js'), 'jquery', '1.0');
    In bbpress-quotes.js
    change the where the variable theQuote is initialised to this : var theQuote = "div#post-"+commentID + " .bbp-reply-content";

    Then change this line : var posttext = document.getElementById(theQuote).innerHTML;
    To be this :
    var posttext = $(theQuote).html();

    Then also add these lines:

    // remove reply revision info
    var posttext = posttext.replace(/<ul id="bbp-reply-revision-log(.*?)>((.|\n)*?)(<\/ul>)/igm, "");

    Below :
    //var posttext = posttext.replace(/<a class="comment_reply_link"(.*?)>((.|\n)*?)(<\/a>)/ig, "");

    Those are the changes I made and it's now working again.
    Sorry I cannot be more precise with line numbers in the js file, I've moved lines around a bit working this out.

    Also keep in mind if the author releases a new version it will overwrite these changes!

  3. Anointed
    Member
    Posted 2 years ago #

    Not sure what I am missing as I made the changes and it even makes sense. Still getting the error.

    Could you throw this up on git as the author seems to be not available?

  4. aravoth
    Member
    Posted 2 years ago #

    same, getting the same error despite the changes

  5. Arun Singh
    Member
    Posted 2 years ago #

    Try this:

    Just open the bbpress-quotes.js file and in the Quote function

    Add this after try statement starts:

    var editor_html = document.getElementById('bbp_reply_content-html');
                    switchEditors.switchto(editor_html);

    and this before functions return is called:

    var editor_tmce = document.getElementById('bbp_reply_content-tmce');
                    switchEditors.switchto(editor_tmce);

    Working awesome for me.

  6. aravoth
    Member
    Posted 2 years ago #

    Arun Singh, do you mind showing us what line that code should go on? Javascript is not something I'm very familiar with.

  7. Arun Singh
    Member
    Posted 2 years ago #

    Hi avaroth,

    In the bbpress-quotes.js file replace the quote function with the following edited version :

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

  8. Arun Singh
    Member
    Posted 2 years ago #

    avaroth see the code here http://pastebin.com/qnbwsLWU

  9. grumblemarc
    Member
    Posted 1 year ago #

    None of these solutions offered is working for me on WP 3.4.2

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic