Skip to:
Content
Pages
Categories
Search
Top
Bottom

Links to last post are wrong (pagination issue?)


  • reedy
    Participant

    @reedy

    At first, I thought this was a redirect issue because when someone was replying to some topics, the redirect URL was stripping out the pagination (in some cases).

    For example, getting to the end of a topic with the following URI:

    /forums/topic/name-of-topic/page/155/

    The redirect after submitting a reply was:

    /forums/topic/name-of-topic/#post-599473

    So basically, the pagination slugs seem to have been stripped. As a result, the poster is directed back to the first page of the topic.

    However, I’ve also noticed that this is an issue with links on the activity stream, too.

    For example, the timestamp for one specific reply that appears in the activity feed has the link:

    /forums/topic/name-of-topic/#post-610386

    Yet, the link should be:

    /forums/topic/name-of-topic/page/156/#post-610386

    So I think there may be a hyperlinking issue on topics that have a high number of pages?

    Another idea – the name of the topic in this specific case is very long. Maybe the length of the URL is an issue? However, if it is I don’t know why it would be stripping the pagination slugs out of the links.

    Does anyone have any ideas?

Viewing 25 replies - 1 through 25 (of 28 total)

  • nesiditsa
    Participant

    @nesiditsa

    Hello! I excuse for my english, it is not my native language.
    I have a same problem. I think that issue relates to long topics (more than 100 pages) too. Ğ¢emporarily this trouble resolves by bbpress’s repair tools – Recalculate the position of each reply. But after posting some new posts in topic this problem returns.
    Do you resolve this?

    Hi,
    Can you both please give some info:
    – WP version
    – bbPress version
    – Any plugins that could have an influence

    Thanks, Pascal.


    nesiditsa
    Participant

    @nesiditsa

    Hi!
    WordPress 4.4.1 (i have this problem on older versions)
    BbPress 2.5.8-5815

    Installed plugins are:
    bbPress Moderation
    BuddyPress
    GD bbPress Attachments

    Ok,
    To my knowledge, length should not be an issue here.
    Try to change the permalinks to see if that helps.
    Pascal.


    nesiditsa
    Participant

    @nesiditsa

    Pascal! What exactly should i do with permalinks?

    Most of forum’s topics work perfectly. But when number of topic’s pages exceeds 100 – this problem appears. I agree with Reedy, most probably it is a pagination issue.

    What theme do you use ? Can you confirm that you have the same issues in a standard WP theme ?
    You don’t have any redirection plugins (like 404 Redirected) ?
    How do you show your topics ? Using a shortcode ? Do you have multiple shortcodes on the same page ?

    Pascal.


    nesiditsa
    Participant

    @nesiditsa

    Pascal!

    I’m trying to debug this problem. It seems that there is some fault in bbp_update_reply_position() or bbp_get_topic_reply_count() functions because “Menu_order” field of posts in long topic contains wrong number. It is few than real position of post.


    nesiditsa
    Participant

    @nesiditsa

    I found some hack to resolve problem with wrong calculation of position of new post in long topics.

    I change false to true in line 356 of file with path /plugins/bbpress/includes/replies/functions.php.

    Before changes: ‘menu_order’ => bbp_get_topic_reply_count( $topic_id, false ) + 1
    After changes: ‘menu_order’ => bbp_get_topic_reply_count( $topic_id, true ) + 1

    And it works for me!


    tharsheblows
    Participant

    @tharsheblows

    Yes, there’s an error with some of the menu_order bits. In addition to @nesiditsa’s edit (the same as this patch: https://bbpress.trac.wordpress.org/changeset/5392) you might need to apply these as well: https://bbpress.trac.wordpress.org/changeset/5338


    reedy
    Participant

    @reedy

    Those patches are over two years old. I’m running the latest version of bbpress and still have this issue. Do I need to apply the patches above to core? Why aren’t they in the current stable release?


    bullarni
    Participant

    @bullarni

    Hi,
    I am seeing this exact same issue on a forum I use and it’s pretty annoying. The worst part being redirected back to the start every time a reply is posted. The same issue is also present in the thread links that are included in the notification emails sent to participants subscribed to the thread.


    @reedy
    have you resolved your issue yet? Have the patches mentioned above that apparently resolve the issue been incorporated into a stable release version yet?

    Note: as mentioned in this issue, only topics with a large amount of replies is affected by the bug. In our case we have one topic with over 950 pages and one with over 740 pages so this issue has been affecting the two most popular topics for quite a while now.

    I am just a user so don’t have any knowledge of what version of bbPress they are currently running but I would like to help them resolve the issue. If the fix is included in a release version I believe it will be much easier to help them update than trying to explain how to apply the proposed patches.

    Cheers


    reedy
    Participant

    @reedy

    @bullarni No, this hasn’t been resolved (I’m running the latest stable version of bbpress). I have not tried implementing the patches since they are so old.


    bullarni
    Participant

    @bullarni

    Thanks for the info @reedy

    That is a shame.


    nesiditsa
    Participant

    @nesiditsa

    Guys, this patches are still work perfectly! Don’t hesitate to use them. After that run all forum’s tools to recalculate positions of old posts.


    bullarni
    Participant

    @bullarni

    Hi @nesiditsa

    Excuse my ignorance but if those patches are applied do they continue to “just work” if the version of bbPress a site is running is updated? Or could potential changes to the core prevent the patches from working properly? Do the patches currently need to be reapplied whenever the core is updated?

    Do you know of any good reason the fixes in the patches have not been incorporated into the core already?

    Thanks


    nesiditsa
    Participant

    @nesiditsa

    Hi @bullarni
    This patches should be applied after any bbpress core update to renew changes.
    I’m not bbpress developer and i don’t know reasons for which it not fixed yet in current stable version of core.


    bullarni
    Participant

    @bullarni

    Thanks for confirming @nesiditsa!


    bullarni
    Participant

    @bullarni

    Hi @casiepa

    Are you able to provide any update on this issue? Is it possible to review and incorporate the fixes @nesiditsa has discussed into the bbPress core or are there any plans to do so?

    Thanks


    Anonymous User 13302461
    Inactive

    @anonymized-13302461

    Just to confirm this issue exists for me on latest updates,
    Wordpress 4.8.1
    BBpress 2.5.13

    On a long topic (75 pages) exactly the same issue. Only the the most recent replies URLs go to the start of the topic. Older replies URLs work and go to the relevant reply. Sometimes the topic shows 76 pages, other times 75…!

    I thought I was clever and deleted the most recent replies up to the one which was working, all replies links to the correct reply. Then I added one new reply of my own, and voila, broken again and links to my most recent were missing the pagination part of the URL /76/ and clicking the link (despite having /#post-1234545/ in the URL) takes me back to the first page of the topic.


    bullarni
    Participant

    @bullarni

    Hi @welshdemon, @reedy

    I have asked about this issue within the 2.6 Release Candidate 3 thread. Have not had a response as yet, however I only asked a couple of days ago. Hopefully someone will respond with positive news soon!

    bbPress 2.6 Release Candidate 3

    Cheers


    reedy
    Participant

    @reedy

    Thanks for pushing on this. Hopefully it will get resolved.


    Virtualtopia
    Participant

    @virtualtopia

    This is still an issue and is annoying.


    Cazadividendos
    Participant

    @cazadividendos

    It still happens.

    Can you add the fix to an stable version or explain how to fix it without losing the fix with every bbpress update?

    Thanks!


    ico33
    Participant

    @ico33

    Still happening. Is it so difficult to fix it?


    Virtualtopia
    Participant

    @virtualtopia

    This is the most annoying issue with BBPress and has been an issue for who knows long. Members in my forum start a new topic and abandon the old one when this happens. It makes things messy.

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