• wpweaver

    (@wpweaver)


    Your 1.0.1 version has 2 bugs in one statement.

    The line

    $patternData['[post-link]'] = 'topic' !== $post->post_type ? bbp_get_reply_url( $post_id ) : get_the_permalink($post_id);

    will work MUCH better if you use:

    patternData['[post-link]'] = bbp_get_reply_url( bbp_get_reply_id( $post->ID ) );

    This makes mentions from both topics and replies give the correct link. The fix comes from bbPress’s subscription code. Before, topics was generating a link to the page where the topic form was, which is not really correct in many cases.

    And although with my fix it is not relevant, I think you must have meant $post->ID instead of $post_id in your original.

    Users of my forum pointed out the problem.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Ismail

    (@elhardoum)

    Hello there wpweaver,

    Thank you so much for taking time to report this bug. Yes it makes sense I was pulling the permalink regardless of bbPress API which you pointed out, and apparently get_the_permalink defaults the post id parameter (while null) to the global $post that’s how it called to that form page.

    I am pushing an update shortly. Thanks again and have a good day!

    Best,
    Samuel

Viewing 1 replies (of 1 total)
  • The topic ‘Bug fix for [post-link]’ is closed to new replies.