WordPress.org

Forums

NS Cloner - Site Copier
[resolved] Source dropdown blank (11 posts)

  1. msrebuildings
    Member
    Posted 11 months ago #

    I've installed and network-activated the plugin, but when I go to select the cloning mode and source, the dropdown of available sources is blank (no items).The network currently has ~10 sites, mostly on subdomains.

    https://wordpress.org/plugins/ns-cloner-site-copier/

  2. Never Settle
    Member
    Plugin Author

    Posted 11 months ago #

    Interesting issue! The NS Cloner is using WP's built in wp_get_sites() function to retrieve and display a list of available sources - can you try adding a test.php file in your root directory with the following code:

    require 'wp-load.php';
    print_r( wp_get_sites() );

    Then try loading that test.php in the browser and see if it outputs that ~10 sites as expected? That way we can narrow it down to a Cloner display issue or a WP issue (maybe another plugin is filtering that result, etc.)

  3. msrebuildings
    Member
    Posted 11 months ago #

    Hi - thanks for the quick reply. We never got round to testing this as we found that at some point one of our team had made a small change to WP core, which we reverted and it worked after.

  4. Never Settle
    Member
    Plugin Author

    Posted 11 months ago #

    Great, glad to here it was an easy fix!

  5. Joel Bernerman
    Member
    Posted 9 months ago #

    Hi, you should change the version compability on the front page of this plugin.
    wp_get_sites() was implemented in wp 3.7

  6. Joel Bernerman
    Member
    Posted 9 months ago #

    Or even better implement a fallback for older wp-versions.
    Something like this...

    if (!function_exists('wp_get_sites')) {
      $sites = get_blog_list(0, 'all');
    }
    else {
      $sites = wp_get_sites($args);
    }

    I know get_blog_list is deprecated but it only because of performance reasons and performance might not be of any matter when doing this kind of tasks.

  7. Never Settle
    Member
    Plugin Author

    Posted 9 months ago #

    Ah, great catch - thank you. We have an update coming out soon and we'll squeeze in that change (or min version update).

  8. sfdjraj
    Member
    Posted 9 months ago #

    I have the same issue -

    "when I go to select the cloning mode and source, the dropdown of available sources is blank (no items)"

    I'm running wp3.5 and have updated to latest NS Cloner 3.0.3.1

    If yo-l1982's code will do the trick, where do I put that in?

  9. Never Settle
    Member
    Plugin Author

    Posted 9 months ago #

    Quickly looking through our code and dependent add-ons it looks like there are several places you'd have to modify. If you can hang tight, we're wrapping up an update that implements @yo-l1982's suggestion across the boards and should have it out in a day or two.

    Thanks for your patience!

  10. sfdjraj
    Member
    Posted 9 months ago #

    Sounds Great, Thank you!

  11. Never Settle
    Member
    Plugin Author

    Posted 9 months ago #

    Just wanted to follow up and let you know that we released this update a couple days ago with lots of other goodies in there too. Check out the changelog for details.

    Best!
    NS

Reply

You must log in to post.

About this Plugin

  • NS Cloner - Site Copier
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags