Forum Replies Created
-
In reply to: Weird freshness bugs
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.
In reply to: Weird freshness bugsOk, thanks for your help.
In reply to: Weird freshness bugsI’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)?
In reply to: Weird freshness bugsInitial 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)
In reply to: Weird freshness bugsHum, 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 …
In reply to: Weird freshness bugsI 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.