• Resolved ecat

    (@ecat)


    About a month ago, I tested multisite under 3.6 and felt it would be a great fit for my application, which is a main organization with separate chapters. Each chapter will have its own site. Everything seemed to work well at that time. But at some point it began to act strangely as described below, and so today I reinstalled using 3.7 and got the same strange behavior. I will try to describe it:
    When I drop down the menus under “My Sites” it does not list the individual sites, but rather lists the main site multiple times. When I try to use My sites/network admin/sites, pick a site, and go to the dashboard, and change the title, changing one title seems to change each site title to the same thing. And the Site label to the right of the My Sites does not change. At one time I looked at the options under each site table and the site name seemed to be correct. There are other crazy things going on with the theme, but at this time I am back to the default theme. I can’t give you access to the setup.
    Do I have to leave define(‘WP_ALLOW_MULTISITE’, true); in the config, or could this make a difference?

    I am going to do it all one more time, but if anyone can help, I am desperate!! Maybe there is something fundamental that I don’t understand.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter ecat

    (@ecat)

    I may have finally figured it out! I am using the Weaver II Pro Theme which allows two types of backups: a w2b and a w2t. I never understood the difference so always did a w2b. BUT I just learned the w2b has some site settings in it. And those were clobbering something about the setup. I have been running for a few minutes now and everything seems to be working. I am going to mark this as resolved and keep my fingers crossed!

    Thread Starter ecat

    (@ecat)

    It happened again. This time, I was working in User Meta Pro (which seems to have at least one bug in multisite, that’s another topic). I had rebuilt my site and everything had looked good for one day. I have two blogs, one called “WIN” (main one) and the other called “Test Chapter”. I don’t know how to insert a picture here, so I will describe it. What I see:
    My Sites Test Chapter
    Network Admin
    WIN
    WIN

    whereas it should be:
    My Sites Test Chapter
    Network Admin
    WIN
    Test Chapter

    And no matter which “WIN” I press above, I get “Test Chapter” site, not the WIN Site.
    Can anyone tell me where to look in the database to see if there are clues there? I re-enabled all my plugins, including one I have written, but I don’t see how anything could create this mess.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Yes, you have to leave the allow multisite defines in your wp-config.

    Which title are you changing? You should only be changing site information from that particular site admin, NOT the network admin?

    It’s possible you made a bad change in your messing about. Do you know how to get in to your database via phpMyAdmin and look at the tables? You’ll want to check wp_blogs to see if things are listed correctly first.

    Thread Starter ecat

    (@ecat)

    I don’t think I was changing anything from the site info at all. I think the problem happened about 9pm. (I was also working with Event Manager plugin setup). Today I installed database backup from 7pm and it behaves the same (wrong). I just looked at wp_blogs and it looks good to me. There are two sites listed, with the same domain, and one pointing to the root, and one to /testchapter/. But the root gives me test chapter content but the root url. When I look at wp_posts it appears to have the correct page data for the main blog, root, but I can’t reach it. When I enter a url with just the domain name, I get the content from testchapter. It is consistent!!! Where else can I look in the database? Anything in options?

    Thread Starter ecat

    (@ecat)

    One more strange thing–
    I have a “custom” menu entry on the test chapter site that was supposed to point back to the main site. But instead it shows the page that was the home page on the main site. But the menu entry is correctly pointing to the root url.
    I am going to rebuild again tonight, but I need to find out what I am doing.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Without you being able to say what ‘title’ you changed and where, we cannot help you.

    Yes, start over if you have nothing to lose. Do it SLOWLY. Check that things work between each step.

    Thread Starter ecat

    (@ecat)

    I have been changing site things only from the individual sites’ dashboard (while I am logged in as a super-admin). So, I use the My Sites drop down, select a site, and it appears next to the “My Sites”. Then I click on the site and choose dashboard, and change whatever. The only thing I do from Network Admin is add sites and activate plugins. Sometimes I do My Sites/Network Admin/Sites/choose a Site/ choose dashboard and get to the dashboard from there. If any of this is not right, let me know, I am going to be watching very carefully as i rebuild.

    Thread Starter ecat

    (@ecat)

    I think I have figured it out. I wanted a global array $chapters[] of all of my sites with the chapter name. So, here is my code, in functions.php in a child theme. Note, it was not a function, just inline code. Any time I activated the child theme the craziness began. I need the functionality, because I need to be able to move between the chapters. So, I would appreciate learning the right way to do it. It showed the right stuff on the error_log, but really confused the admin display. The database was fine, when I deleted the code, it is okay again.

    global $chapters;
        global $wpdb;
        global $blog_id;
    if (function_exists('is_multisite') && is_multisite()) {
    
            // check if it is a network activation - if so, run the activation function for each blog id
    
            $old_blog = $wpdb->blogid;
                // Get all blog ids
                $blogids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs WHERE spam = '0' AND deleted = '0' AND archived = '0' ");
                foreach ($blogids as $blog_id) {
    		$table=$wpdb->base_prefix.$blog_id."_options";
    		if($blog_id==1)$table=$wpdb->base_prefix."options";
    		$blogname = $wpdb->get_var("SELECT option_value FROM ".$table." WHERE option_name='blogname' ");
    		error_log("SELECT option_value FROM ".$table." WHERE option_name='blogname' ");
                    error_log("base prefix is ".$wpdb->base_prefix);
    		$chapters[$blog_id]=$blogname;
    		//  var_dump($blogname,"blogname ".$blog_id);
                }
    	    error_log("functions Chapters:".print_r($chapters,true));
    
            }
        else {
    	$chapters[2]="Test Chapter";
    	$chapters[1]="North Charleston";
        }
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Very Confused Multisite’ is closed to new replies.