[buddypress-trac] [BuddyPress Trac] #6195: Ajax Activity Update Fails to Post When Akismet Enabled
buddypress-trac
noreply at wordpress.org
Fri Feb 6 22:26:40 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: |
----------------------------------+------------------------------
Changes (by SlothLoveChunk):
* keywords: reporter-feedback =>
Comment:
I admit, I am new to this sort of debugging, so let me just show you what
I did. Function with logging:
{{{
function bp_filter_metaid_column_name( $q ) {
/*
* Replace quoted content with __QUOTE__ to avoid false positives.
* This regular expression will match nested quotes.
*/
$quoted_regex = "/'[^'\\\\]*(?:\\\\.[^'\\\\]*)*'/s";
preg_match_all( $quoted_regex, $q, $quoted_matches );
$q = preg_replace( $quoted_regex, '__QUOTE__', $q );
log_it('$q First: ' . $q);
$q = str_replace( 'meta_id', 'id', $q );
log_it('$q Second: ' . $q);
// Put quoted content back into the string.
if ( ! empty( $quoted_matches[0] ) ) {
for ( $i = 0; $i < count( $quoted_matches[0] ); $i++ ) {
$quote_pos = strpos( $q, '__QUOTE__' );
$q = substr_replace( $q, $quoted_matches[0][ $i ],
$quote_pos, 9 );
log_it('$q Third: ' . $q);
}
}
return $q;
}
}}}
Note the three calls to the 'log_it' function.
Additionally, after looking in the database and playing around a bit the
issue may be related to line 474 of bp-activity-askimet.php:
{{{
bp_activity_update_meta( $activity->id, '_bp_akismet_submission',
$this->last_activity->akismet_submission );
}}}
I noticed that when the post update fails to get a response there is no,
"_bp_akismet_submission" entry in the wp_bp_activity_meta table.
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6195#comment:3>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list