[buddypress-trac] [BuddyPress] #3540: Forum topics requested by AJAX do not include object/group name

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu Sep 1 15:40:27 UTC 2011


#3540: Forum topics requested by AJAX do not include object/group name
-----------------------------------+------------------
 Reporter:  boonebgorges           |       Owner:
     Type:  defect                 |      Status:  new
 Priority:  minor                  |   Milestone:  1.5
Component:  Forums                 |     Version:
 Severity:  minor                  |  Resolution:
 Keywords:  has-patch 2nd-opinion  |
-----------------------------------+------------------
Changes (by boonebgorges):

 * keywords:   => has-patch 2nd-opinion


Comment:

 The problem is that $bp->is_directory gets set by
 bp_update_is_directory(), inside of the screen functions for each
 component. But when you're making an ajax request, the screen functions
 never get fired (the wp_ajax_ hooks come before bp_screens, and all output
 is killed after locate_template()).

 I've attached a patch that does a sort of rudimentary check, during an
 ajax request, to see whether you're looking at a directory. It feels a bit
 hackish to me; we should probably be setting bp_update_is_directory()
 sooner. But that poses its own problems, of course, since BP has a
 tradition of doing all of its display checks really late. So I think this
 is probably as good a fix as we are going to get at the moment, and it's
 an edge case anyway.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/3540#comment:1>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list