Support » Plugin: Multisite Site Index » Max of 100 sites?

  • Resolved Jasonian

    (@jasonian)


    Just tried this one out to replace an old plugin that is no longer supported.

    I love it, but it seems to cap out at 100 sites. (I have nearly 200 to display).

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Nick Halsey

    (@celloexpressions)

    Good catch! It looks like get_sites() defaults to returning 100 sites: https://developer.wordpress.org/reference/functions/get_sites/.

    I could update the plugin to default to returning all sites, but I’m worried that may cause issues in some cases on large networks. I could also consider adding an option to the widget for the number of sites to show and only show that option when there are more than 100 sites, then add an attribute to the shortcode as well.

    Do you think that one of those change would be a good approach?

    I think adding the option would be the safest route, honestly. In all likelihood, those with more than 100 sites have a higher probability of understanding the extra load on their server.

    Jasonian

    (@jasonian)

    Any update on this? The old plugin throws errors, but still works on the front end. I’d love to use yours in its stead, but I can’t live with a 100 site limit.

    Thanks again!

    Plugin Author Nick Halsey

    (@celloexpressions)

    I just pushed version 1.1, which adds an option for number of sites on networks with more than the default 100 sites. Let me know if that works!

    It works, sort of. I am always adding and removing sites with turnover. I used a much higher number than I need right now, just so I don’t have to think about it in the future.

    I’ve also noticed that if the tagline is missing, it’ll push the <li> sort of under the previous li, so it looks like a nested list, but semantically it isn’t. (I fixed this with a little inline js(jQuery)).

    It also shows three non-existent sites if the number=”” is greater than the number of sites.

    Have you considered using the count() method to return the number of sites to use? Would it be possible to listen for the registering or deregistering of new or existing sites to update the number so it isn’t fired every time the shortcode is served?

    Just spitballing here. I don’t use PHP enough to be able to write it. I know enough JS to fix the output, but not enough to prevent the server errors, which were something I was hoping to solve with your plugin (which, btw, is an improvement already, so thank you!)

    WordPress database error 
    
    Table 'wp_bmadmin.wp_258_options' doesn't exist 
    for query SELECT option_value FROM wp_258_options 
    WHERE option_name = 'wp_258_user_roles' LIMIT 1 
    
    /* From [benchmark.us/network-sites/] in [/nas/content/live/bmadmin/wp-content/plugins/multisite-site-index/multisite-site-index.php:170] */ 
    
    made by require('wp-blog-header.php'), 
    require_once('wp-includes/template-loader.php'), include('/themes/make/template-builder.php'), 
    get_template_part, 
    locate_template, 
    load_template, 
    require('/themes/make/partials/content-page-builder.php'), 
    get_template_part, 
    locate_template, 
    load_template, 
    require('/themes/make/partials/entry-content.php'), 
    the_content, 
    apply_filters('the_content'), 
    WP_Hook->apply_filters, 
    call_user_func_array, 
    do_shortcode, 
    preg_replace_callback, 
    do_shortcode_tag, 
    call_user_func, 
    multisite_site_index_do_shortcode, 
    multisite_site_index_get_markup, 
    switch_to_blog, 
    WP_Roles->__construct, 
    WP_Roles->_init, 
    get_option
    • This reply was modified 7 months, 2 weeks ago by  Jasonian.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Max of 100 sites?’ is closed to new replies.