yujin (@yujin)

Forum Replies Created

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

  • yujin
    Member

    @yujin

    Hi, Felix.

    I also got Redirect Loop error. bbPress keeps redirecting me to the same tag page as it compares decoded actual uri string and non-decoded should-be string.

    $bb->debug = 1 will show the actual- and should-be- request URLs for the tag page, instead of redirecting former to the latter.

    This trouble is issued as a difect at https://trac.bbpress.org/ticket/585 , which I may have mixed up.


    yujin
    Member

    @yujin

    Hi, same problem here in Japan (no wonder;-p)

    The error is caused by a function bb_repermalink() in bb-includes/functions.php, which redirects the request to the correct permalink. You will see what is happening by setting the debug flag in your config file and access the tag page which causes the error

    config.php

    $bb->debug = 1;

    Must be lacking utf8_uri_encode() somewher. I tried adding this right before the evaluation part at the bottom of the function and it seems to be working so far.

    $domain = bb_get_option('domain');
    $domain = preg_replace('/^https?/', '', $domain);
    $check = preg_replace( '|^.*' . trim($domain, ' /' ) . '|', '', $permalink, 1 );
    $check = utf8_uri_encode($check); // add this line

    Well, I don’t really understand the structure of the bbPress source code so the solution here is something very opportunistic and may cause a side-effect.

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