Skip to:
Content

BuddyPress.org

Changes between Initial Version and Version 1 of Ticket #6940, comment 6


Ignore:
Timestamp:
03/11/2016 05:39:40 AM (4 years ago)
Author:
r-a-y
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6940, comment 6

    initial v1  
    11I came across a similar problem today with `bp_blogs_record_existing_blogs()`.
     2
     3tl;dr - `bp_blogs_record_existing_blogs()` is not a very well-coded function when used on large sites.
     4
     5----
    26
    37The site in question is a single-site install with a rather large userbase.
     
    1317So the admin dashboard always gets a WSOD.
    1418
    15 The problem here is two-fold; `bp_blogs_record_existing_blogs()` is not a very well-coded function when used on large sites.
     19----
    1620
    17 There are two ways to fix this:
    18 1. Do not attempt to record existing users to the `wp_bp_user_blogs` table on a single-site install as it doesn't make much sense.
     21The problem here is two-fold:
     22
     231. Do not attempt to record existing users to the `wp_bp_user_blogs` table on a single-site install as it doesn't make much sense to do so.
    19242. Modify bp_blogs_record_existing_blogs() to check the user count on a single site install and use a check similar to `wp_is_large_network( 'users' )`.  If the install is large, bail.
    2025
    21 I would go with patch 1.
     26I would go with patch 1 to fix this.
    2227
    2328For other improvements to `bp_blogs_record_existing_blogs()`, also see #6370.