Forums

Join
bbPress Support ForumsTroubleshootingpossible error in topic_link() function

Info

possible error in topic_link() function

  1. i think that the following line:
    echo apply_filters( 'topic_link', get_topic_link( $id ), $id, $context );
    should be replaced with this line:
    echo apply_filters( 'topic_link', get_topic_link( $id, $page, $context) );

    this is inside the topic_link() function, in functions.bb-template.php file
    i use version1.0-alpha-6 and this line is number 855.

    please correct me if i'm wrong.

  2. Can you explain what problems this line is causing, and what changing the line does to fix it? How did you find this problem?

  3. i wanted to modify my template, in order to send the user to the last page of the selected topic. (this was before i discovered the topic_last_post_link() function).

    in order to do this, i manually computed the last page number and send it to topic_link() through the $page parameter. nothing happened so i looked at the code and found the error i've mentioned. after replacing that line with the one i've suggested, everything seemed ok.

    any thoughts?

  4. I think you should file a bug and a patch at http://trac.bbpress.org/ . They will decide there if it's valid or not.

  5. You must log in to post.