[buddypress-trac] [BuddyPress Trac] #2768: Use WP comments' threaded comment depth settings

buddypress-trac noreply at wordpress.org
Sun Mar 30 17:51:23 UTC 2014


#2768: Use WP comments' threaded comment depth settings
-------------------------+---------------------------
 Reporter:  DJPaul       |       Owner:  boonebgorges
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  2.0
Component:  Activity     |     Version:
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+---------------------------

Comment (by boonebgorges):

 Good catch, r-a-y. This only happens when the parent is not retrieved in
 the current loop, which would only happen in certain instances when
 display_comments=stream and the parent is out of scope. I've managed to
 reproduce it.

 Your fix will essentially short-circuit the depth calculation in these
 sorts of situations, by forcing the depth to be set to 1. This prevents
 the infinite recursion, and doesn't really hurt anything in the interface,
 since we don't allow comments-on-comments when display_comments=thread.
 But it does result in an incorrect value for 'depth', which may be
 misleading down the road.

 2768.02c.patch modifies your patch to fetch the direct parent when it's
 not found in the already-queried items. In some cases, this will result in
 additional query overhead. But it will also guarantee correct depth
 calculations, which IMO is a fair tradeoff for this fairly unusual
 circumstance. Could you give it a quick sanity check?

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/2768#comment:14>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list