Skip to:

Avoid redirection on single-topic reply

  • jjaureguiberry


    I’m trying to integrate buddypress-docs with bbpress forums; the intention is to have topics of discussion within an article/doc. Using buddypress-docs hook ‘bp_docs_after_doc_content’, I create a corresponding forum (if it doesn’t exist) and add a shortcode to display a topic creation form. If a topic exists and is selected, I redirect to the associated article, and display a single topic with:
    echo do_shortcode( '[bbp-single-topic id=' . $topic_id .']' );
    So far, so good, I don’t know if it is the right aproach, but it seems to work.
    The problem comes when I want to post a reply within the selected topic. $_REQUEST variables are used to detect and display the selected topic, but on single-topic the additional ‘bbp_redirect_to’ hidden field is added, causing to redirect and lose those variables. I commented the line where this field is added (bbpress/includes/common/template.php:1620) and it works the way I want, but don’t want to do that 🙂
    Any suggestions on how to work this around without messing around with the plugin’s code? Hope the issue is clear, thank you for any help you can provide and for taking the time to read this.

    Wordpress ver. 4.8.2
    BBPress ver. 2.5.14
    BuddyPress Docs ver. 1.9.4

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