Skip to:

Opened 10 years ago

Closed 10 years ago

Last modified 3 years ago

#5405 closed defect (bug) (duplicate)

Can't go on the latest page of "Groups"

Reported by: elpix's profile elpix Owned by:
Milestone: Priority: highest
Severity: critical Version: 1.9.2
Component: Groups Keywords:


Hi there,

I have a big BP website (80,000 groups on february 2014), and the problem is that I can't go on the last page of my groups page :

The MySQL query is too big (all the group_id are included in the query, with a LIMIT at the end).

Do not hesitate to contact me for more information.


Change History (6)

#1 @boonebgorges
10 years ago

  • Keywords reporter-feedback added

Can you please share the problematic query? (Without the 80,000 group ids, of course)

#2 @elpix
10 years ago

SELECT g.*, gm1.meta_value AS total_member_count, gm2.meta_value AS last_activity FROM wp_bp_groups_groupmeta gm1, wp_bp_groups_groupmeta gm2, wp_bp_groups g WHERE = gm1.group_id AND = gm2.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND IN (1,2,3,4,5,6,7,9,10, ... ,91998,91999) ORDER BY last_activity DESC LIMIT 20, 20;

#3 @boonebgorges
10 years ago

Thanks for the additional info. Is it possible for you to get a more complete stack trace on that query? The IN clause should only be happening when you pass an 'include' parameter to bp_has_groups(). I don't think we do this natively anywhere in BuddyPress - and in any case, there's certainly no place where we pass *every group ID* into the 'include' param. So I have a feeling that there is a plugin or other modification that is causing it to happen. (That's not to say it's not a bug in BP, just that it's not a bug that comes up when using BP by itself.) If you could get a complete trace, it'd help us to figure out where the 'include' param is being added.

#4 @elpix
10 years ago

Hi !

Just tell me what I have to do :)

I only have one plugin that affect ajax query, I deactivate it and have the same problem.

#5 @boonebgorges
10 years ago

I guess you can try this. In bp-groups/bp-groups-template.php, find the function bp_has_groups(). Right before the last line of the function (return apply_filters...), put the following:

error_log( print_r( $args, true ) );
error_log( print_r( debug_backtrace(), true ) );

Then, in wp-config.php, find the line that says define('WP_DEBUG', false);. Change it to:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', false );
define( 'WP_DEBUG_LOG', true );

Finally, create a file at wp-content/debug.log, make sure it's writable by the server. Then visit the groups page and reproduce the problem. Then look at the content of the wp-content/debug.log file and send over the relevant bits to me (or the whole thing). If you don't want to post it here for security reasons, you can send it to boone@….

#6 @r-a-y
10 years ago

  • Keywords reporter-feedback removed
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #5404.

Note: See TracTickets for help on using tickets.