[buddypress-trac] [BuddyPress] #4510: Activity stream posting and commenting broken

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Sep 7 00:05:22 UTC 2012


#4510: Activity stream posting and commenting broken
------------------------------------------+------------------------------
 Reporter:  johnjamesjacoby               |       Owner:  johnjamesjacoby
     Type:  defect (bug)                  |      Status:  new
 Priority:  normal                        |   Milestone:  1.7
Component:  Activity                      |     Version:
 Severity:  normal                        |  Resolution:
 Keywords:  has-patch 2nd-opinion commit  |
------------------------------------------+------------------------------
Changes (by boonebgorges):

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


Comment:

 Theme compat itself is not breaking this, but something that got thrown in
 with theme compat is.

 In r6285, the 'bp_after_theme_setup' hook was introduced, hooked to
 'after_setup_theme' at priority 10. At that time, you changed
 bp_dtheme_register_actions() to fire on this new hook. However, since
 bp_dtheme_setup() continued to be hooked to after_theme_setup at priority
 10, and bp_dtheme_setup() is the file where ajax.php (and
 bp_dtheme_register_actions()) is included, a race condition was created on
 after_setup_theme:10. As a result, the AJAX handlers in
 bp_dtheme_register_actions() are not being hooked to their wp_ajax_
 actions.

 The solution is to do one of the following:
 1) Move bp_dtheme_setup() to bp_after_theme_setup
 2) Move bp_dtheme_register_actions() back to after_theme_setup

 I suggest (2). bp-default is a legacy theme now, and should not be
 changed. Moving to a new hook could cause backward compatibility issues
 for themes that load our ajax.php but not our functions.php. I'll commit
 this change if there are no objections.

 The JS errors being noticed before need some more investigation. They
 don't actually seem to be part of the root problem of this ticket.

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


More information about the buddypress-trac mailing list