New Blog Templates not taking on theme

I have used this plugin to create all 100+ of my blogs. It is a great tool. Recently, when I upgraded my blogs template quit working. It creates the site but it does not have the theme or settings from the templated blog. Any help would be appreciated. I have been trying different things for a week now. I thought the new release would fix the problem but I upgraded and I am still having issues.

Thanks

  • DavidM
    • DEV MAN’s Mascot

    Hi richslack,

    Let's see about getting to the bottom of this! You mentioned a single blog template but I was wondering if you've tried any other templates? If not, could you give that a quick try just to see if the plugin is simply not working for any blogs at all?

    Also, Could you maybe delete the current blog template (not the site, but just the template itself) you have set and recreate it?

    One last item to check too, could you let me know what version of WordPress you're using?

    Thanks,
    David

  • richslack
    • Flash Drive

    I just noticed that a new update to Blog Templates was released over the weekend. I have downloaded and replaced the old plugin with the new one 1.2.5.

    Unfortunately I am getting the same behavior. I add a new site using the New Blog Template template that I created off of an existing site. The add new site page begins to load and then it goes to a white screen and stops loading. I never get an error message or a success or failure message. The site just simply stops the process on the white page.

    If I then load the site that I created it has been created but it is a plain "Hello World" site with the default site settings.

    Just to follow through with things I deleted the old template not created with version 1.2.5. I created a new template using a different site. And I added a new site using the new template. Same behavior... White screen after loading and a plain vanilla site is created. The Site Title is correct but everything is vanilla.

    This may come up as a question. . . When it asks "What to copy to new blog?" I am selecting "Wordpress Settings, Current Theme, and Active Plugins" I am also adding "Users". I have NOT checked (Posts and Pages, Categories, Tags, and Links, or Files).

  • DavidM
    • DEV MAN’s Mascot

    Hi richslack,

    Thanks for the additional information. As you're getting a white screen, could you check your error logs to see what they might have to say?

    Also, could you try deactivating New Blog Templates and creating a basic site in order to rule out any conflict occurring before New Blog Templates?

    Thanks for your patience, we'll get to the bottom of this! :slight_smile:

  • richslack
    • Flash Drive

    Alright, so I disabled Blog Templates and attempted to create a new site, and I am getting the same behavior. The error logs show the following:

    [Mon May 16 10:01:50 2011] [error] [client 192.168.100.30] PHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 82 bytes) in /home/wordpress/html/wp-includes/wp-db.php on line 1400, referer: http://MYSITENAME.com/wp-admin/network/site-new.php

    [Mon May 16 10:02:51 2011] [error] [client 192.168.100.30] PHP Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/wordpress/html:disappointed:tmp:disappointed:usr/local/share/pear) in /home/wordpress/html/wp-includes/functions.php on line 2060

    [Mon May 16 10:02:59 2011] [error] [client 192.168.100.30] PHP Warning: file_exists(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/wordpress/html:disappointed:tmp:disappointed:usr/local/share/pear) in /home/wordpress/html/wp-includes/functions.php on line 2051

    Any direction on how to fix these errors. We bumped up the memory allocated amount to 512.

  • sarah101
    • Design Lord, Child of Thor

    Hi Guys,

    I am having a similar issue when trying to create a new site using a new blog template. When I try to create a new site, it is not being created with my selected theme and the widgets are not being copied over. Everything else looks like it is being copied over.

    Here is the error I am getting:

    21-May-2011 18:58:18] PHP Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/scrtntwk/public_html/wp-includes/widgets.php on line 858

    This is the same error that is appearing on the front page widget areas of the new site that I just created with the new blog template.

    I am using the Catalyst Theme with WordPress Multi-site v3.1.2.

    Thanks

  • DavidM
    • DEV MAN’s Mascot

    Hi sarah101,

    I believe what you're experiencing has to do with how Catalyst stores it's settings, but we can check on that. Could you try creating a template using Twenty Ten as the theme on the templated site?

    If that works as it should, this would have something specific to do with Catalyst and in that case, if I could get you to open a new thread on that, we'll take a look with you.

    @richslack, if you could let me know those few items regarding PHP, I'll be glad to take see what else we can find.

    Thanks,
    David

  • sarah101
    • Design Lord, Child of Thor

    Hi David,

    Ok, I tried to create a new site based on using the twenty ten theme, but I am still getting the same error code as above. (see screenshot) When I check the widgets admin section, it appears that they are not being copied. So, it does not look like an issue with the theme, but rather an issue with the widget data not being copied over.

    Thanks

  • DavidM
    • DEV MAN’s Mascot

    Thanks for checking on that and thanks for providing that screenshot, certainly helps to be able to see what's going on there.

    That's not an error I've seen before with this. I'm wondering if it's got something to do with one of those widgets. Could you let me know what widget(s) you have in that template?

    Thanks,
    David

  • wecreateyou
    • The Crimson Coder

    This happened to me a couple weeks ago and somehow I got it working but couldn't nail down what I did that made the difference. So I'll ask, have you ever copied any table data, and have you been using the Blog ID#1 as your template blog at any point?

    The reason I ask is that somewhere along the way I did both of these things and that's when the issue started. a clean install with these things sorted out seemed to help me.

  • richslack
    • Flash Drive

    No, my blog ID #1 has an entirely different set up so I have never used it as a template. It is open to the public whereas the others are private blogs where search engines are blocked. For this reason I have stayed away from ever using it as a template.

  • DavidM
    • DEV MAN’s Mascot

    Hi richslack,

    I really can't see a reason New Blog Templates would be having this issue but given those php errors I can't really see it as having to do with the latest version.

    Have you by any chance tried creating a new site with New Blog Templates deactivate? If not, could you give that a try?

    Thanks,
    David

  • sarah101
    • Design Lord, Child of Thor

    Hi David,

    I am using text, php, translatethis, wp bannerize, text, text, recent posts, twitter, and links widgets. These are the same widgets I was using with a previous version of new blog templates that worked before.

  • DavidM
    • DEV MAN’s Mascot

    @sarah101, to keep things more focused, if you could go ahead and create a new thread mentioning those issues (ie. the widgets you're using and the issue you're having with the templates), we'll take a look with you on that. It's a bit of a different issue than the php issue here so with a new thread we can keep focused on that matter.

    @richslack, could you give that last note I mentioned a try? Creating a new site with New Blog Template deactivated?

    Thanks,
    David

  • sarah101
    • Design Lord, Child of Thor

    Hi David,

    As wecreateyou stated above, can we use Blog ID #1 (the main / first blog) to create the first new blog template?

    Or do we need to create a second blog (Blog ID #2) to use for the first new blog template?

    Thanks

  • DavidM
    • DEV MAN’s Mascot

    Hi sarah101,

    You can use the main blog as a template if you like, it's just not advised except perhaps for testing purposes. As the main site often is more dynamic than other sites, it's not really the best choice for a template, but it can be done.

    And to help clarify, I actually use blog id 1 quite often in testing templates.
    [EDIT: This is not a good idea currently. I use a theme which wouldn't likely be unaffected by difficulties but using the main blog id 1 currently isn't advised.]

    Also, the first template could be based off of any site in your network. That part's totally up to you. :slight_smile:

    Cheers,
    David

  • richslack
    • Flash Drive

    I tried creating sites with new blog templates deactivated again (I referenced trying it the first time in my post Posted on 19th May 2011). I got a similar result as last. In Mozilla I was taken to a white screen where it never finished loading or notified me that the site was created. In internet explorer it gives me an HTTP 500 server error. So the error goes deeper than New Blogs Template. . . Any ideas?

  • DavidM
    • DEV MAN’s Mascot

    Hi richslack,

    Thanks for the additional information. Do you have other plugins running currently? If so, can you try deactivating them all to ensure this isn't related to a plugin? And perhaps switch to Twenty Ten just to be thorough?

    It would definitely help to rule out any other plugins causing an issue here.

    Another good thing to check would be to make sure that your wp-config.php and htaccess files are as they should be, according to what's posted in Tools > Network.

    Could you look into those things and let us know how that goes?

    Thanks,
    David

  • richslack
    • Flash Drive

    I network disabled (as well as disabling on my main site) all the plugins. And I still have the same error. I tried to get to Tools > Network and I do not have that menu item which caused some confusion at first but after doing some reading I discovered why. . . Apparently if you upgraded from an existing WordpressMU site you are not given the network menu item, which I did. Is there any other way to check to make sure my wp-config and htaccess are correct? Any other ideas?

  • richslack
    • Flash Drive

    HERE IS THE root problem:

    The huge memory amounts occur from storing the database query resultsets. This is happening in the function: wp-db::get_results. The database query in particular doing the most damage on the main index page is: “SELECT user_id, meta_key, meta_value FROM wp_usermeta WHERE user_id IN (1)”. This is returning a result set with 80K+ rows and uses 117MB to store the result. Your wp_usermeta table in MySQL is only 23MB of data in it but the function “get_results” wraps that into a pretty array with a lot of bloat.

    Here is the stack trace for the main index page to give them:

    get_results()(meta.php:329);
    update_meta_cache()(user.php:1074);
    get_user_metavalues()(user.php:1056);
    _fill_user()(pluggable.php:121);
    get_userdata()(query.php:3531);
    setup_postdata()(query.php:2777);
    the_post()(featured-post-widget.php:53);
    widget()(widgets.php:182);
    display_callback()(:slight_smile:;
    call_user_func_array()(widgets.php:891);
    dynamic_sidebar()(home.php:9);
    include()(template-loader.php:43);
    require_once()(wp-blog-header.php:16);
    require()(index.php:19);

  • richslack
    • Flash Drive

    A little more information may be helpful. Read the above post with this one. We bumped up the memory super high and were able to create a blog. We then investigating what was eating up so much memory and the above post is what we found. Something is not right.

  • DavidM
    • DEV MAN’s Mascot

    Thanks for all the additional information, richslack. Certainly does help get to the root of the issue. And it looks like its all tied up in the users options.

    Can you try creating a template with the Users option unticked, then try creating a site off that template?

  • Mason
    • DEV MAN’s Sidekick

    Hiya

    As we haven't heard anything for awhile on this one I'm marking it as resolved. Should ya have the need for further instruction, please 'reopen' this thread and we'll continue to take a look.

    You can always alternatively open up a new thread.

    Thanks!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.