[buddypress-trac] [BuddyPress Trac] #5503: possible fatal in bp_groups_prefetch_activity_object_data() when no group to fetch

buddypress-trac noreply at wordpress.org
Mon Mar 31 21:13:55 UTC 2014


#5503: possible fatal in bp_groups_prefetch_activity_object_data() when no group
to fetch
--------------------------+-----------------
 Reporter:  DJPaul        |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  2.0
Component:  Groups        |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------
 All of a sudden I seem to be having weird environment problems with
 BuddyPress. I haven't figured that out yet, but whatever's going on, led
 to a nice fatal:

 > [31-Mar-2014 20:10:24 UTC] WordPress database error You have an error in
 your SQL syntax; check the manual that corresponds to your MySQL server
 version for the right syntax to use near ')' at line 1 for query SELECT *
 FROM wp_bp_groups WHERE id IN () made by
 > require('wp-blog-header.php'), require_once('wp-includes/template-
 loader.php'), include('/themes/twentyfourteen/page.php'),
 get_template_part, locate_template, load_template,
 require('/themes/twentyfourteen/content-page.php'), the_content,
 apply_filters('the_content'), call_user_func_array,
 bp_replace_the_content, apply_filters('bp_replace_the_content'),
 call_user_func_array, BP_Groups_Theme_Compat->single_content,
 bp_buffer_template_part, bp_get_template_part, bp_locate_template,
 load_template, require('/plugins/buddypress/bp-templates/bp-
 legacy/buddypress/groups/single/home.php'), bp_get_template_part,
 bp_locate_template, load_template, require('/plugins/buddypress/bp-
 templates/bp-legacy/buddypress/groups/single/activity.php'),
 bp_get_template_part, bp_locate_template, load_template,
 require('/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity
 /activity-loop.php'), bp_has_activities,
 BP_Activity_Template->__construct, bp_activity_get,
 BP_Activity_Activity::get, BP_Activity_Activity::prefetch_object_data,
 apply_filters('bp_activity_prefetch_object_data'), call_user_func_array,
 bp_groups_prefetch_activity_object_data

 There's a route through `bp_groups_prefetch_activity_object_data()` where
 `$uncached_ids` can be set to an empty array, and when it's used with the
 `wp_parse_id_list()` function, it returns an empty string, leading to the
 malformed SQL error as per this ticket description.

 I am getting this on the /groups/mygroup/ screen (i.e. activity view).

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5503>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list