Skip to:
Content
Pages
Categories
Search
Top
Bottom

Weird freshness bugs

  • @ziga-sancin

    Participant

    I’m seeing some weird freshness bugs on a bbpress installation (version 2.5.5). I’m using a different forum structure (a forum index, subforums, etc. – a traditional phpBB layout), so the bug is even more visible to the general public, but it’s certainly not the cause of these bugs, because I can easily reproduce the bug just by clicking on the trash link in the frontend or WordPress Admin and looking at the postmeta database.

    I’ve tried using the admin tool to recalculate freshness, but it makes the whole situation worse. So, I have to manually change the freshness postmetas of all forums and subforums. πŸ™

    I’ve encountered at least three different bugs:
    – wrong freshness set for parent forum and subforums after trashing a post
    – wrong freshness set for forums and subforums after using freshness recalculation via admin tools
    – no updated freshness set for parent forum and subforums after untrashing a post

    This seems like a blocker to me. How can I help? Are those bugs covered inside bug #2414 or bug #1925?

Viewing 12 replies - 1 through 12 (of 12 total)
  • @robkk

    Moderator

    I’m using a different forum structure (a forum index, subforums, etc. – a traditional phpBB layout

    what are you using exactly??

    @ziga-sancin

    Participant

    I have a forum structure like: Forums > Forum > Subforum > Topic. After trashing a reply inside a topic the postmeta keys _bbp_last_active_id / _bbp_last_active_time / _bbp_last_reply_id for the parent forum and subforum get the wrong values (some old reply) or are sometimes even missing in case of using the admin repair tool for freshness.

    @ziga-sancin

    Participant

    Hum, I was wrong about the forum structure, it’s actually: Category > Forum > Subforum > Topic. Categories were changed to forums or subforums and forums were changed to subforums or categories a lot in the past. I guess I have to debug freshness and see where it gets the wrong recent posts and topics …

    @robkk

    Moderator

    Categories were changed to forums or subforums and forums were changed to subforums or categories a lot in the past

    you lost me here

    I guess I have to debug freshness and see where it gets the wrong recent posts and topics …

    make sure you followed all the troubleshooting tips here

    Before Posting

    other than that it would be tricky to find the issue

    if you do find anything please report back

    @ziga-sancin

    Participant

    Initial forum structure:
    Category 1
    – Forum 1
    — Subforum 1
    – Forum 2
    — Subforum 2
    — Subforum 3
    etc.

    Changed forum strcture:
    Forum 1 (changed to category)
    – Subforum 1
    — Forum 2
    – Category 1 (changed to forum)
    — Subforum 2
    — Subforum 3
    etc.

    Situations like this happen all the time – clients whishing to move around or delete forums, subforums and categories.

    But now to my observations about freshness. I think it’s a caching problem. The function bbp_update_topic_walker is responsible for all the calculations that happen when some changes to topics are made. Further it calls the function bbp_update_forum for all the topic ancestors. Inside there are calls to the functions bbp_update_forum_last_topic_id, bbp_update_forum_last_reply_id, bbp_update_forum_last_active_id and bbp_update_forum_last_active_time. Let’s concentrate on the function bbp_update_forum_last_reply_id: first it queries all the forums and subforums, then it queries topic ids and then it really gets interesting with the function bbp_forum_query_last_reply_id. πŸ™‚ That function checks for an existing cache of a reply, which can return false or the contents of the cache (wp_cache_get) … Now, the problem is that this function returns 0 in my case! So, the new cache can’t be calculated and the freshness gets set to the first reply in the last topic or even nothing if it doesn’t get that value. Any ideas? (the admin repair tools don’t solve anything)

    @robkk

    Moderator

    Structure shouldn’t be causing an issue.

    But now to my observations about freshness. I think it’s a caching problem.

    do you have cache on for logged in users?? it is usually recommended to not have cache for logged in users.

    @ziga-sancin

    Participant

    I’m running a copy of the website on my laptop (Mac OS X Yosemite, Apache, PHP, MySQL) without a persistent caching plugin. I don’t think logged in users have anything to do with this problem, because we’re talking about the WordPress/bbPress internal caching functions (WP Object Cache).

    I’ve also slightly modified the bbp_forum_query_last_reply_id function to accept the value of 0 and run the query and then the wp_cache_get returns the correct value, but after reverting the changes wp_cache_get again returns 0. Do I need to clear the object cache (which is stored somewhere in the options table according to the WP Object Cache docs)?

    @robkk

    Moderator

    your issue very well might be the same as the trac tickets you posted

    but i cant confirm.

    i suggest you contact the bbPress plugin developers in slack.

    Development

    @ziga-sancin

    Participant

    Ok, thanks for your help.

    @fuskeren

    Participant

    Hi Ziga Sancin,

    Did you find a solution for this problem?

    -Mads

    @ziga-sancin

    Participant

    I rewrote the caching part of freshness output… However, the patch in bug #2414 fixed my issues, so I don’t need this workaround anymore.

    @fuskeren

    Participant

    Hi Ziga,

    Hmm, weird. Even with latest build of 2.6 i still have an issue, with an imported database from phpbb. But thanks anyway πŸ™‚

    -Mads

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