[buddypress-trac] [BuddyPress] #4759: Group forum permalink after reply broken when using persistent object cache

buddypress-trac noreply at wordpress.org
Thu Jan 10 12:12:33 UTC 2013


#4759: Group forum permalink after reply broken when using persistent object cache
--------------------------+--------------------------------------
 Reporter:  wpdennis      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Forums        |    Version:  1.6.1
 Severity:  blocker       |   Keywords:  dev-feedback 2nd-opinion
--------------------------+--------------------------------------
 When using a persistent object cache (in my case
 [http://wordpress.org/extend/plugins/memcached/ memcached]) the group
 forum doesn't refresh correctly. I've found multiple issues after posting
 a reply to an existing topic.

 '''Wrong Permalinks'''

 In the group forum topic list the topic permalink is broken (for the topic
 which received a reply). The permalinks to the other topics stay correct.

 In [https://buddypress.trac.wordpress.org/browser/trunk/bp-forums/bp-
 forums-template.php#L709 bp_get_the_topic_permalink()] the topic reaches
 the third condition (''bp_is_single_item()'') instead the first
 (''bp_get_the_topic_object_slug()''). The reason is, that in
 $forum_template->topic '''the $object-* members aren't set''', like
 $forum_template->topic->object_slug and $forum_template->topic->object_id.

 Since the $object-* members of $topic should contain the group and are
 missing, there is no connection between topic and group anymore. So the
 function returns a default forum link instead of a group forum link, which
 results in a 404.

 But I can't figure out, when the object-* members should be added to
 $topic. Is it in bb_append_meta() in ''functions.bb-meta.php''? It only
 adds $forum_template->topic->voices_count in my case, but since it's a
 function of bbpress, it isn't the right spot, I think.

 Can someone help me to find the function which should add the $object-*
 members?

 ----

 '''Disabling Cache'''

 I tried to exclude the group "bb-topic" from object cache, Doing so, I get
 wrong permalinks for each topic. That's very strange. It means, if a
 $forum_template->topic isn't loaded from cache, it misses the object-*
 members. But before I enabled memcached at all, everything worked fine.

 Multiple times it happened, that the links started working again. Can't
 say for sure, but it seems that if the cache expires (or memcached deleted
 it), the $topic is correct again.

 ----

 '''Additional issues'''

 - After posting a reply, the reply is missing on the topic page (for
 everyone, including the author himself).
 - In some cases the group forum directory (topic list) doesn't show the
 reply and doesn't refresh the reply count + timestamp of the topic. Found
 the maybe related [https://buddypress.trac.wordpress.org/ticket/4522
 ticket] from DJPaul, too.

 Maybe we should separate these issues. But before opening more tickets I
 would like to track the permalink issue down. Maybe it's only one bug - or
 maybe it's just my installation.

 Additionally, BP 1.7 isn't far ahead and maybe we just need a quick
 workaround instead of a bugfix, if it gets more complex. What do you
 think?

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4759>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list