#5405 closed defect (bug) (duplicate)
Can't go on the latest page of "Groups"
Reported by: | elpix | Owned by: | |
---|---|---|---|
Milestone: | Priority: | highest | |
Severity: | critical | Version: | 1.9.2 |
Component: | Groups | Keywords: | |
Cc: |
Description
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 : http://www.biowebspin.com/groups/
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.
Bye
Change History (6)
#2
@
11 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 g.id = gm1.group_id AND g.id = gm2.group_id AND gm2.meta_key = 'last_activity' AND gm1.meta_key = 'total_member_count' AND g.id IN (1,2,3,4,5,6,7,9,10, ... ,91998,91999) ORDER BY last_activity DESC LIMIT 20, 20;
#3
@
11 years ago
Thanks for the additional info. Is it possible for you to get a more complete stack trace on that query? The g.id 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
@
11 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
@
11 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@….
Can you please share the problematic query? (Without the 80,000 group ids, of course)