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

Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #2483
    kardon
    Participant

    This is where I put it in base_lib

        protected function __construct($options_id) {
    
            $this->multisite = function_exists('is_multisite') && is_multisite();
            if ($this->multisite) {
                $this->blog_ids = $this->get_blog_ids();
                // get Id of 1st (main) blog
                $this->main_blog_id = $this->blog_ids[0][0];
            }
    
            $this->init_options($options_id);
    
        }
        // end of __construct()
    
        <strong>/**
         * Returns the main site IDs
         * @global $current_site
         * @return $current_site->blog_id
         */
        
        public function get_main_site() {
            global $current_site;
            
            return $current_site->blog_id;
        }
        // end of get_main_site()</strong>
    
        /**
         * Returns the array of multisite WP blogs IDs
         * @global wpdb $wpdb
         * @return array
         */
        protected function get_blog_ids() {
            global $wpdb;
    #2484
    Vladimir
    Keymaster

    OK. You missed to call it. Let’s make a step forward, replace line

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

    at the __construct() function with this one:

    
    $this->main_blog_id = $this->get_main_site();
    
    #2503
    kardon
    Participant

    I never got to complete that last change. But, everything is now working.

    Over the weekend the hosting provider took several actions. They turned off HHVM, recompiled my PHP and Apache server settings and then removed URE plugin.

    I reinstalled the plugin nice and clean after all was done. It all works perfectly now.

    No one could identify exactly what fixed things although they feel the HHVM could be the problem.

    I do greatly appreciate all your efforts with this problem. Without the specifics you gave me they would have never figured any things to try. They aren’t coders so they couldn’t figure out where the problem could possibly be coming from in their set up.

    #2505
    Vladimir
    Keymaster

    Thanks for the information. Good that this issue was resolved finally.

Viewing 4 posts - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.