Disappearing Default Template

For the second time now, the default blog template I created has disappeared from the Blog Templates list. This happened before and I cannot pinpoint any activity for why the setting went missing. Figured it was a fluke, but it just happened again.

I noticed that a new blog was created, using the default 2011 theme instead of the theme and widgets I set up in the site that I set as a default template.

Any idea why the default template would disappear from the list and no longer be applied? We've added no new plugins, and can't see any other reason why the setting no longer gets applied, all of a sudden. After I recreate the template, it does apply to new sites. But this is now the second time I've had to do this.

Any feedback is greatly appreciated.

  • jcnjr

    Thanks for asking. The sites are getting created through the normal registration process. Currently all new sites are getting the template applied. What has happened twice now, is that all of a sudden for no apparent reason, the template goes missing out of the list and no longer gets applied.

    Aside from the Supporter plugin, the only thing even remotely related to blog creation that I can think of is this small script I have in mu-plugins to add all new registrants as subscribers to the main blog, whether they create a site or not...

    function tri_new_user($user_id) {
    add_user_to_blog('1', $user_id, 'subscriber');
    }
    add_action( 'wpmu_new_user', 'tri_new_user');
    
    function tri_new_blogger($blog_id, $user_id) {
    add_user_to_blog('1', $user_id, 'subscriber' );
    }
    add_action( 'wpmu_new_blog', 'tri_new_blogger', 10, 2 );

    This, however, nor any other plugins have changed before, during or after the time when the Default Blog Template issues occurred.

  • Mason

    Argh. This sounds like one of those intermittent issues I get with my car sometimes. "Can't diagnose it if we can't hear it making the sound"

    I'll ask the plugin developer if he has any thoughts on this. Maybe we can enable some logging in the plugin to track this for next time it comes up. Can you look at your php error logs around the time those sites were created to see if there's anything there?

    Thanks!

  • Mason

    Hiya,

    Just checking if it was eventually resolved in another thread? Or by yourself separately to us? Or by us over email with you? Or using our live support?

    If so, no need to reply, that's great news.

    If not, could you let us know by re-opening this topic, and we'll get onto it and helping you out asap!
    Otherwise, happy days, glad you got it sorted :slight_smile:

    Thanks!

    p.s. I've also tagged Vlad here in case you do reopen this, as they'll definitely be able to help you!

  • jcnjr

    OK, this just happened again, out of the blue. Unfortunately there is nothing in the error logs to indicate anything abnormal at the time the site was registered. The site was created at the time the user was registered, and they had never visited their dashboard.

    I went to check the new site and immediately noticed it was using the Twenty Eleven theme instead of the theme and other settings I have specified in my default blog template. I went to check the Blog Templates settings and sure enough, the template was gone, it was no longer listed under Blog Templates.

    From the date of my first post above, the last time this happened was about 30 days ago. Is there any settings anywhere that may affect the time frame this plugin may be active? We do have Supporter installed (haven't upgraded to Pro Sites yet) but I've confirmed we have no "Free Days" specified and I can't think of anything else that could cause this plugin to stop working periodically like it's doing.

    I'm open to any suggestions for troubleshooting, it's really getting frustrating since to activate our default theme and settings when this happens, I must click through the Supporter welcome/upgrade message which means our members aren't seeing it when the first log into their site.

    <sigh>

  • jcnjr

    Nope, not a multi-db setup, but thanks for asking.

    I did notice lots of the following errors in the log file that resides in /wp-content. I had previously been looking in my server error logs. If these are unrelated, I may start another topic about this since it seems to happen a lot!

    [15-Nov-2011 03:43:35] PHP Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/tripawds:disappointed:usr/lib/php:disappointed:usr/local/lib/php:disappointed:tmp) in /home/tripawds/public_html/wp-content/plugins/simple-sitemaps/simple-sitemaps.php on line 159
    [15-Nov-2011 03:43:35] PHP Warning: mkdir() [function.mkdir]: open_basedir restriction in effect. File(/) is not within the allowed path(s): (/home/tripawds:disappointed:usr/lib/php:disappointed:usr/local/lib/php:disappointed:tmp) in /home/tripawds/public_html/wp-content/plugins/simple-sitemaps/simple-sitemaps.php on line 160
    [15-Nov-2011 03:43:35] PHP Warning: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/home/) is not within the allowed path(s): (/home/tripawds:disappointed:usr/lib/php:disappointed:usr/local/lib/php:disappointed:tmp) in /home/tripawds/public_html/wp-content/plugins/simple-sitemaps/simple-sitemaps.php on line 159
    [15-Nov-2011 03:43:35] PHP Warning: mkdir() [function.mkdir]: open_basedir restriction in effect. File(/home/) is not within the allowed path(s): (/home/tripawds:disappointed:usr/lib/php:disappointed:usr/local/lib/php:disappointed:tmp) in /home/tripawds/public_html/wp-content/plugins/simple-sitemaps/simple-sitemaps.php on line 160
    [15-Nov-2011 03:43:35] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/tripawds/public_html/wp-content/plugins/simple-sitemaps/simple-sitemaps.php:159) in /home/tripawds/public_html/wp-content/sitemap.php on line 22

  • Mason

    Hiya,

    Yeah, that error message is unrelated. Probably just a bad copy of the simple sitemaps plugin. I'd actually recommend using our Infinite SEO plugin over that one - it's WAY more impressive.

    Anyway, another thing to do would be to check your wp_sitemeta table and look for a blog_template_options meta_key. Check to make sure you only have one of these entries and make a copy of the meta_value. If a template disappears again, you can easily restore it from your backup.

    I'm still not sure why this would be happening, but at least this saves you the hassle of needing to set it all back up. I know Vlad's been busy but I'll ask him if he has any suggestions.

    Thanks!

  • jcnjr

    Thanks for the info! Yup, only one entry, and if you don't mind, I'm including it here for my own future reference should this happen again. I've also attached a screenshot. If anything looks wonky, please advise.
    a:2:{s:9:&quot;templates&quot;;a:1:{i:0;a:3:{s:4:&quot;name&quot;;s:21:&quot;Template 1c - Cutline&quot;;s:7:&quot;blog_id&quot;;i:1364;s:7:&quot;to_copy&quot;;a:3:{i:0;s:8:&quot;settings&quot;;i:1;s:5:&quot;posts&quot;;i:2;s:5:&quot;terms&quot;;}}}s:7:&quot;default&quot;;s:1:&quot;0&quot;;}

  • Mason

    Hiya jcnjr,

    This is really very strange - it's possible that a server-level issue such as an apache restart would cause something like this.

    I know someone else was having a similar issue (can't remember if it was blog templates though - and my search skills are failing me) that was caused by server restarts. I believe in their case a mysql database repair did the trick.

    You were able to restore from the backup here at least, I hope.

  • jcnjr

    Thanks for the concern! We didn't lose any data, just the default blog template settings. I had run the repair prior to it happening this time, so that didn't do the trick.

    I just did a test, and restarting Apache did not clear the template. Perhaps it had something to do with the reboot... I just don't understand why, and will need to remember to check for the template if/when we have to do another hard restart like that.

  • Mason

    Hiya,

    As we haven't heard back from you we're going to assume the problem was sorted out and mark this ticket as resolved.

    If it wasn't resolved, or you have any more questions related to this thread please feel free to post them below and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Otherwise, thanks for using the forums, and for being a member of WPMU DEV, it's a pleasure to help you out and we look forward to being of assistance in the future.

    Thanks

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.