apet083 (@apet083)

Forum Replies Created

Viewing 20 replies - 1 through 20 (of 20 total)

  • apet083
    Participant

    @apet083

    Well I don’t know how or why but as soon as I made that change, the issue went away and nothing else has broken (yet). As soon as I changed the code back to how it was, the issue reappeared. So since I have nothing else to go on, I will take this as a solution.


    apet083
    Participant

    @apet083

    Done. Thanks for your help 🙂


    apet083
    Participant

    @apet083

    O.M.G I have finally come across the solution to my problem! Well I have only tested it in my local environment a couple of times and the issue has gone away so hopefully it’s fixed for good!

    https://bbpress.trac.wordpress.org/ticket/2155

    The solution was to change the `bbp_redirect_to_field()` function. I changed this function located in bbpress\includes\common\template-tags.php and the redirects now work!

    Thanks bbPress team =)

    Modified function:

    `function bbp_redirect_to_field( $redirect_to = ” ) {

    // Make sure we are directing somewhere
    if ( empty( $redirect_to ) ) {
    if ( isset( $_SERVER[‘REQUEST_URI’] ) ) {
    $redirect_to = ( is_ssl() ? ‘https://’ : ‘http://’ ) . $_SERVER[‘HTTP_HOST’] . $_SERVER[‘REQUEST_URI’];
    } else {
    $redirect_to = wp_get_referer();
    }
    }

    // Remove loggedout query arg if it’s there
    $redirect_to = (string) esc_attr( remove_query_arg( ‘loggedout’, $redirect_to ) );
    $redirect_field = ”;

    echo apply_filters( ‘bbp_redirect_to_field’, $redirect_field, $redirect_to );
    }`


    apet083
    Participant

    @apet083

    Hi @johnjamesjacoby, thanks for your reply and for the helpful places to look. I have debugged functions.php in bbpress/includes/replies and it seems that the `redirect_to` is being set to the forum’s URL as in this image:

    http://dl.dropbox.com/u/100066470/replyURL.PNG

    Thus giving the wrong `reply_url` at the end. Where does `redirect_to` get set?

    Thanks


    apet083
    Participant

    @apet083

    Yes, would be good if someone, anywhere could replicate my issue – but at least there’s something to go on now.

    I will keep hunting around for similar problems/solutions. Let me know if you make any progress, thanks again 🙂

    Ana


    apet083
    Participant

    @apet083

    Wow. Stephen I just read your post about trying the past versions of bbPress to isolate the issue. I started at 2.0 and the redirects WORKED! I moved up each time my tests were successful. 2.0 – 2.0.3 work perfectly.

    As soon as I upgrade to 2.1 and upwards, the redirects break again!

    I think it is safe to say it is a bbPress issue. Hopefully someone can look into it 🙂 I will try to examine the redirect differences between 2.0.3 and 2.1 and will post if I find anything useful.

    For now I will use bbPress 2.0.3 and hopefully the issue will get sorted 🙂

    Thanks so much for your help!

    Ana


    apet083
    Participant

    @apet083

    Thanks Stephen, that was a very nice blog and it’s good to see that people are updating the documentation as the years go on. The PHP manager was a good install that I did not have and it touched on some issues that I spent hours trying to fix and will surely be of benefit to someone.

    However, the configuration used was practically the same as mine and did not fix the redirect problem 🙁

    Thanks anyway.

    Ana


    apet083
    Participant

    @apet083

    Thanks Stephen. Unfortunately the web.config made no difference 🙁 Neither did changing the permalinks to every option or removing slugs etc.
    I also tried setting up a fresh WP Install with a clean copy of bbPress but it did the same thing.
    I am stumped and completely out of options at the moment :-/
    I look at my network stack trace and notice when I hit “Submit” the error code returned is a 302 Moved Temporarily, this is when it redirects to the wrong URL.
    Debugging the code, it seems to hit the same place in query.php about 2-3 times meaning it’s loading the correct page, getting redirected to the wrong page, then loading the wrong page…
    Thanks anyway, hopefully someone else will have this problem with a solution at some point!


    apet083
    Participant

    @apet083

    Hi Stephen @netweb. I just tried creating a WordPress site from scratch with bbpress. When I clicked on reply it redirected me back to the wrong page again. It seems like its my settings with IIS.
    If I use the WordPress default permalink structure (no rewrite) it still does the same thing.

    What could be in your IIS that I don’t have? Where would this setting be located?

    Also, what version of PHP and MySQL do you have? I have PHP 5.3 MySQL 5.1

    Thanks


    apet083
    Participant

    @apet083

    I still can’t think of what the problem could be. I will keep hunting around. Thanks.


    apet083
    Participant

    @apet083

    Thanks for your reply Stephen. The site is live on Windows Server 2008 with IIS 7.5

    All other links seem to work, it is just when people reply to topics that it jumps around…

    After resetting permalinks on my dev environment and setting the slugs to the WordPress defaults these are the URLS.

    Navigating to a topic from the list of recent topics:
    http://localhost/sitename/forums/topic/test-topic/

    Navigating to a forum from the list of forums:
    http://localhost/sitename/forums/forum/forum-name/

    Navigating to a topic after clicking on a forum from above:
    http://localhost/sitename/forums/topic/test-topic/ (this is consistent with the first link which is good).

    Posting a reply from inside test-topic
    http://localhost/sitename/forums/forum/forum-name/#post-158293

    Posting a reply from http://localhost/sitename/forums/topic/test-topic/#post-158277:
    http://localhost/sitename/sitename/forums/topic/test-topic/#post-158294

    Note that it doubled the sitename ^ but this doesn’t seem to affect it and lands back at the topic which is what I want.


    apet083
    Participant

    @apet083

    Thanks Stephen. So it is something to do with my rewrite rules? I am using Windows 7 on IIS 7.5 so those links don’t really help me much.
    I have XDebug running on Notepad++ to debug my php code, would it be worth it if I stepped through the code in which it’s creating the URL? If it would be worth it, any idea where to start?
    I have already looked at bbp_get_reply_url method calls in some of the bbp files but nothing has really helped much.

    Thanks
    Ana

    P.s. butterflies is the name of the FORUM, not the topic title. The rewrite ignores the topic title completely.


    apet083
    Participant

    @apet083

    Same issue! Can anyone help??


    apet083
    Participant

    @apet083

    Any updates on this? Same thing is happening to me in Firefox 17. Thanks


    apet083
    Participant

    @apet083

    @viktora you are a genius! I used your fix but changed the double quotes to single quotes and that worked!! THANK YOU!!


    apet083
    Participant

    @apet083

    Sorry the p tags were obviously not displayed:

    <ptag Great article in the Southland Times today about Earthlore: //endptag

    Also have some br's in the posts.

    I tried using the built in forum converter but that just said "Starting conversion" and hung there for over 30 minutes so I stopped it and did bbConverter again without any luck…


    apet083
    Participant

    @apet083

    Hi I have the same problem! I used bbConverter! Anyone have any ideas??

    Thanks


    apet083
    Participant

    @apet083

    Hi I still have this problem even after upgrading to bbPress 2.2. My posts still have and tags all through them!

    I used bbConverter to convert the standalone bbPress forum to the new plugin version 2.1.

    Here is an example of what my posts look like:
    Great article in the Southland Times today about Earthlore:

    The replies are formatted fine. The fix mentioned above didn’t work for me, and I don’t want to edit the bb core files because they will just get wiped in the next update. Is there anything I can do??

    Thanks


    apet083
    Participant

    @apet083

    Hi did you happen to find out how to fix this? The same issue is happening to me! Thanks


    apet083
    Participant

    @apet083

    @Hard Seat Sleeper I have the exact same problem as you and have no idea what is wrong! I need to move my standalone bbPress forums to the new plugin version. Tried with the standalone importer but once I click “import” It just goes to a blank screen and doesn’t do anything!

Viewing 20 replies - 1 through 20 (of 20 total)