[buddypress-trac] [BuddyPress Trac] #6717: bp_core_get_directory_pages() with BP_ENABLE_MULTIBLOG returns wrong pages

buddypress-trac noreply at wordpress.org
Fri Nov 6 09:33:11 UTC 2015

#6717: bp_core_get_directory_pages() with BP_ENABLE_MULTIBLOG returns wrong pages
 Reporter:  wpdennis          |      Owner:
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Component - Core  |    Version:
 Severity:  blocker           |   Keywords:  dev-feedback
 /bp-core-functions.php#L548 bp_core_get_directory_pages()] tries to load
 the pages from cache:

 $pages = wp_cache_get( 'directory_pages', 'bp' );

 The cache group "bp" is added as a global cache group in

 If I enable BP_ENABLE_MULTIBLOG, ''bp_core_get_directory_pages()'' would
 return pages from the current blog id:

 $posts_table_name = bp_is_multiblog_mode() ? $wpdb->posts :
 $wpdb->get_blog_prefix( bp_get_root_blog_id() ) . 'posts';

 Since "bp" is a global cache group ''bp_core_get_directory_pages()''
 doesn't return the right results, if another blog called it first and the
 cached result isn't expired (which means it's wrong pretty much always
 except for the first blog).

 I think with BP_ENABLE_MULTIBLOG enabled the cache group shouldn't be

 I ranked this ticket as "blocker" since it's absolutely not possible to
 configure a BP_ENABLE_MULTIBLOG enabled installation without hacks.

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

More information about the buddypress-trac mailing list