Change WordPress user roles and capabilities Forums How to or FAQ Problem with shortcodes after moving WP to a new server Reply To: Problem with shortcodes after moving WP to a new server


If URE is network activated it uses options data from the main blog for all subsites.
Your site new installation differs somehow. Try to debug code related for work with options data to understand what’s going wrong with your setup and enhance the URE’s code.

Main blog ID is defined at includes/classes/base-lib.php constructor:

$this->main_blog_id = $this->blog_ids[0][0];

Let’s replace it with this line:

$this->main_blog_id = $this->get_main_site();

and add a new public method to URE_Base_Lib class:

    public function get_main_site() {
        global $current_site;
        return $current_site->blog_id;
    // end of get_main_site()

This way we will relay on WordPress in a question of main site ID definition.

Test shortcodes after this update. Just in case debug data you showed yesterday was not actual somehow and main site ID is not 1.

If it will not help, let’s proceed with debugging of init_options method at includes/classes/ure-lib.php, line #154.

User Role Editor takes its configuration/options data from there. As you can see it switches to the main blog before to get data if it’s network wide activated under WP multisite.