[buddypress-trac] [BuddyPress Trac] #6195: Ajax Activity Update Fails to Post When Akismet Enabled

buddypress-trac noreply at wordpress.org
Sun Feb 8 14:24:09 UTC 2015


#6195: Ajax Activity Update Fails to Post When Akismet Enabled
----------------------------------+------------------------------
 Reporter:  SlothLoveChunk        |       Owner:  boonebgorges
     Type:  defect (bug)          |      Status:  reviewing
 Priority:  normal                |   Milestone:  Awaiting Review
Component:  Component - Activity  |     Version:  2.2
 Severity:  normal                |  Resolution:
 Keywords:                        |
----------------------------------+------------------------------

Comment (by boonebgorges):

 Thanks for the continued debugging. So far I still don't see what's going
 wrong, but let's keep plugging away :)

 Maybe this is something I should've asked earlier, but can you clarify the
 behavior for me a bit more? If I'm reading the above correctly, it's only
 the AJAX response (and the corresponding dynamic activity update when
 looking at the activity stream) that are affected. The new items are being
 created properly in the db, you note, which I assume means that they
 appear in the stream when you do a page refresh. Is that correct?

 The reason I ask is that I'm not entirely sure how a failure in
 `bp_update_activity_meta()` would cause the AJAX failure, unless the meta
 failure was causing invalid output to be echoed in response. You say "The
 'post_update' Ajax listener in buddypress.js is not receiving a "response"
 back though" - does this mean that the AJAX request times out? or that you
 get a 500 error? or something else? What does your browser console tell
 you?

 As for the specifics of the failure:

 > Interestingly, I don't have a 'wp_bp_activity_meta' entry with
 ('activity_id = 404100' and 'meta_key = _bp_akismet_submission'), hence
 why the query doesn't return a result. When you tested and it worked do
 you see new entries in 'wp_bp_activity_meta' with a meta_key =
 '_bp_akismet_submission'?

 Yes, I do have a value, and it's possible that this is part of the issue.
 It's possible that `bp_filter_metaid_column_name()` is somehow corrupting
 the serialized data in the `_bp_akismet_submission` meta_value field
 (though even this seems dubious, because we're not seeing an INSERT
 statement at all).

 Have we ascertained that `WP_DEBUG` is not giving you any warnings?
 Perhaps it would help to have a closer look at *all* of the SQL queries
 from the problematic period. Put `define( 'SAVEQUERIES', true );` into wp-
 config, along with a logger like the following:

 {{{
 function bp_6195_showqueries() {
      global $wpdb;

      echo '<pre>';
      print_r( $wpdb->queries );
      echo '</pre>';
 }
 add_action( 'shutdown', 'bp_6195_showqueries' );
 }}}

 Take note of all the SQL queries, beginning with the first one related to
 activitymeta. Is anything being improperly filtered?

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


More information about the buddypress-trac mailing list