id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 8592,bp_core_get_directory_page_ids ignores current multisite context,thomaslhotta,imath,"The ''bp_core_get_directory_page_ids'' function in ''src/bp-core/bp-core-functions.php'' is not aware on the current blog if running on a multisite setup. This can cause an issue with the following code in the foreach loop: {{{#!php // Trashed pages should never appear in results. if ( 'trash' == get_post_status( $page_id ) ) { unset( $page_ids[ $component_name ] ); } }}} It checks if a post with $page_id as ID is trashed, but does this in the context of the current blog. So if we are currently not on the main blog and there is a post of any type that has a trashed status, this will remove the page form the array. This happened to me with a ''customize_changeset'' post type that by coincidence had the same id. I think that this is statement would have to be wrapped in something like this to work correctly: {{{#!php // Trashed pages should never appear in results. switch_to_blog( bp_get_root_blog_id() ); if ( 'trash' == get_post_status( $page_id ) ) { unset( $page_ids[ $component_name ] ); } restore_current_blog(); }}} ",defect (bug),closed,normal,10.0.0,Core,1.5,normal,fixed,needs-patch,