New Blog Templates v1.2.5 – Widgets Error With Newly Created Blogs

I have just setup a brand new WPMS v3.1.3 website. I installed New Blog Templates v1.2.5 and created a new template using Blog ID #1 (the main / home blog).

I created a new blog using the new template, but I am getting the following error in the sidebar when viewing the new blog: Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/esempire/public_html/wp-includes/widgets.php on line 858

This new website is the most basic install possible. Everything is default and NO additional plugins or themes installed. Just WP v3.1.3, the default twenty ten theme, and your new blog templates plugin.

The install is located at:


  • sarah101
    • Design Lord, Child of Thor

    Ok, I have just done another clean install and I created a new blog (site) before creating a new blog template. So, instead of using Blog ID #1, I used Blog ID #2 to create the new blog template.

    I then created a new blog using the new blog template and it appears to be working fine. No more widget error.

    So, my question is: Did you guys create the New Blog Template plugin to be able to use the main site (Blog ID #1) or do you have to create a new site first (Blog ID #2) before creating a new blog template?

    It would be nice to be able to use the main blog (Blog ID #1) to create a default site and default template that the New Blog Template could use to create all of the subsequent blogs rather than having to completely modify a second blog (Blog ID #2) as well.


  • DavidM
    • DEV MAN’s Mascot

    Hi sarah101,

    Having tried that myself with id 1, the main blog, I’m experiencing the same with Twenty Ten. Oddly, I’d never noticed the issue in my own use of the plugin, likely because I use the Headway theme and rarely use widgets.

    I’ll get this checked out with the developers and see if there’s not a possibility of using the main blog as the template.

    Thanks for your feedback on this.


  • DavidM
    • DEV MAN’s Mascot

    Hi sarah101,

    I was looking into the issue myself and simply couldn’t spot a reason for the main blog id not working well as a template. I’ll ask the developer leading up the project to comment on whether that’s possible at this point or not.



  • Vladislav
    • Dead Eye Dev


    Thank you for reporting this! It was pretty tricky to spot the cause of the issue because it’s quite subtle (well, obviously, the issue was not so subtle in the end result, but the cause itself was). Anyway, the fix for this should be in version 1.2.6 (just released). Can you please try to upgrade and see if it helps?

  • sarah101
    • Design Lord, Child of Thor


    Well, I just setup a whole new install to test out v1.2.6 using Blog ID #1 and the widget error is gone, but I have noticed that the formatting of my theme is not being completely copied over.

    I am using the Catalyst theme v1.2 with the Dynamik 1.1 child theme. Both are at:

    I see that the color settings appear to be copied over, but the new blog is not displaying them.

    Not sure if the css setting are being copied or what?


  • DavidM
    • DEV MAN’s Mascot

    Hi sarah101,

    When you go to create or edit the template, there may be (depending on what plugins you've got active on a site) some additional database options to check off in the Advanced section.

    Could you take a look and see if there's some theme options there? Here's an illustration to help.

  • sarah101
    • Design Lord, Child of Thor

    Hi David,

    There were three theme tables that were created in the database. I checked all three of these after creating the new blog template and prior to creating the new blog.

    So far, I posted this at the Catalyst help forum:

    Hi Guys,

    I have been trying to use WPMUDEV’s “New Blog Templates” plugin to create new “cloned” blogs in my WPMS install from:

    Strange because the new blog appears with all of the basic Catalyst design features, but the modified colors from the Dynamik admin configuration do not appear.

    Even stranger is that all of the correct modified color settings are shown in the new blog’s Dynamik settings, but they are not being shown on the blog’s homepage.

    My original blog is at:

    My new blog is at:

    It almost appears as if the Dynamik CSS settings are not being used?

    I am using WPMS v3.1.3, Catalyst v1.2, and Dynamik 1.1.


  • sarah101
    • Design Lord, Child of Thor

    Ok, for the benefit of others, here is the fix:

    I exported the dynamik settings from blog #1 (main blog) and imported them into the second blog that I created and it appeared to solve the issue. It looks like by importing the dynamik settings, two new stlye sheets were created in the “themes/dynamik/css/” folder: dynamik-2.css & dynamik-min-2.css and the code that was created:


    <link rel=’stylesheet’ id=’catalyst_minified_stylesheet-css’ href=’′ type=’text/css’ media=’all’ />**

    When new blogs are created and the dynamik theme is applied to them, should they create new css sheets that correspond to the new blogs like mentioned above?

    Oooohhhhhh….. That’s what’s going on!

    I actually thought about this, but then brushed it off.

    The Dynamik Stylesheet is only created after either initial activation of Dynamik or when clicking Save Chnages or Importing settings, etc..

    I just assumed that you had saved your changes at least once or that it had triggered a save at some point.

    So for future instances like this you should just be able to go into your Dynamik Options page and click “Save Changes” once and it should create the Dynamik Stylesheet for you.

    Ok, so long story short… Each new blog will have two corresponding CSS sheets (dynamik-2.css & dynamik-min-2.css)? So, with 250 new blogs, I will have 500 new CSS sheets created in the CSS folder? That would be something like 35mb in just stlyesheets…

    That’s how you can have numerous sites with totally different designs using MU, all with a single installation of Catalyst/Dynamik. The alternative is to have a PHP based stylesheet where it’s one stylesheet dynamically pulling the custom styles from your server’s database with each page load, which would be smaller is terms of size of stylesheets, but much larger in terms of server load.

    Also, I’m not sure that will be an issue regardless. In other words, 35mb isn’t that large with the amount of server space these days, and it will be split out between each sub-site so it’s not like a single site will have to pull from a single 35mb CSS file.

    Anyway, I’m not sure if this was something you were concerned with or just mentioning, but I’m just layout out my thoughts on it. Also, everything gets bigger with 250 sites. You can’t imaging how large your WordPress database will be!

    Well, boys and girls… It’s not perfect, but it works!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.