[URGENT] Pro Sites keeps Registering 'Error' | Won't Find Blog Clone Field

I have had 2 instances so far where shortcode stops displaying on my client's websites that they have ordered and paid quite a bit of money for. What happens is that their shortcode just randomly stops working. Every page on my websites is called to with a shortcode function (ie: [homepage]) so that I can update 1 location in my mu-plugins and it will change them all. What's happening randomly (I mean randomly -- it happened last night then this morning it stopped happening, on 2 sites) is that the [homepage] shortcode will pull the information from the homepage_content.txt file I am using, but the shortcode called to from within that function won't display.

ANOTHER issue (that might be related) is that Cloner keeps throwing an error for me, it will NOT find the new blog in the 'Replace Existing Site' field, it just keeps spinning on the loading animation. When I input the new blogname manually and hit 'CLONE' it will go to the clone screen, however that screen keeps loading but throws an error. After reloading it (even after the error) it appears to have worked fine, the clients website was cloned just fine. But it still told me there was an error.

PLEASE help me - please help me quickly, these clients are throwing a lot of cash at me and I am JUST launched and can't afford to flop with a bug like this. Ahhhhh!!!

  • Ash

    Hello @Jeremy

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    I don't think the shortcode issue is related with Pro Sites, as Pro Sites doesn't deal with shortcode restriction. In addition, reading about the cloner issue it looks like, there is a js error produced. Please right click in chrome browser > Select Inspect Element > Select Console tab > Refresh the page and try to clone again and check if there is any error is shown in the console.

    Again, about the shortcode issue, the shortcode you are using, is it from any plugin or theme? Or custom developed? Did you discuss about the developer, maybe they can track it down?

    Ohh one more thing, this could also happen due to a plugin conflict. But as this is random, it's difficult to track, but you can give a try with the following flowchart: https://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    Please let me know what you get.

    Cheers
    Ash

  • Jeremy

    A lot of my code is custom - but only really within the shortcode. This was the culprit...

    <?php
    /*
    add_action( 'admin_init', 'my_remove_edit_menu' );
    
    function my_remove_edit_menu()
    {
    // Remove unnecessary menus
        $menus_to_stay = array('index.php','profile.php');
    
        foreach ($GLOBALS['menu'] as $key => $value)
    	{
            if (!in_array($value[2], $menus_to_stay) && !is_super_admin()) remove_menu_page($value[2]);
        }
    }
    */
    ?>
  • Ash

    Hello @Jeremy

    I hope you are well today.

    So your main issue is to show just Settings > Google Analytics menu to subsite admin with a custom capability? If yes, for now the only option is to edit the plugin file.

    You need to go /plugins/google-analytics-async/google-analytics-async.php line no 152 and replace

    add_submenu_page( 'options-general.php', 'Google Analytics', 'Google Analytics', 'manage_options', 'google-analytics', array( &$this, 'output_site_settings_page' ) );

    with

    add_submenu_page( 'options-general.php', 'Google Analytics', 'Google Analytics', 'YOUR CUSTOM CAPABILITY', 'google-analytics', array( &$this, 'output_site_settings_page' ) );

    Please note that, this changes will be lost in next update. So it's worth to note down this changes somewhere and apply again after your updates.

    I don't think there is any other way on the fly :slight_frown:

    Please let us know if that works for you.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.