Index: src/bp-core/bp-core-functions.php
===================================================================
--- src/bp-core/bp-core-functions.php
+++ src/bp-core/bp-core-functions.php
@@ -630,6 +630,11 @@
  * @param int $post_id Post ID.
  */
 function bp_core_on_directory_page_delete( $post_id ) {
+	// Stop if we're not on the main BP root blog
+	if ( ! bp_is_root_blog() ) {
+		return;
+	}
+
 	$page_ids = bp_core_get_directory_page_ids();
 	$component_name = array_search( $post_id, $page_ids );
 
