Hi all,

First thing this morning we noticed a client's site was not displaying a theme. I logged in and every single theme was disabled. I enabled their theme (Zen sub theme) to get the site working again.

I've since been trying to find out the cause. About a week ago I moved the sub themes from /sites/all into /sites/hh but it was working fine after I did it. I don't know if that could have something to do with why the themes were disabled this morning?

The other issue is that currently Drupal is showing that the Seven theme is disabled but as you can see by the attached file - it's being used in the overlay isn't it?

Does anyone know what is going on as I'd like to know how it happened so it doesn't happen again?

Thanks

CommentFileSizeAuthor
Picture 1.png830.44 KBwellsys_world
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

wellsys_world’s picture

Hi all,

I should have mentioned that the multisite was sharing a database. I've read posts about past versions of Drupal having the same problem with all themes being disabled when multisite installs are sharing a database.

I've moved the second site to a different database so will post back whether or not this works

Cheers

sun’s picture

Priority: Critical » Normal
greg.harvey’s picture

I am increasingly convinced this is an unfixed issue that's been around for a looong time. I did some extensive research when a similar D6 bug caused a WSOD on a very busy and high-profile site.

I don't believe it's related to anything in particular except heavy database load at the wrong moment. I wrote my thoughts in a reasonable amount of detail here:
http://drupal.org/node/979912#comment-4015666

Short version - core list_themes() function falls back to reading info files if the db goes away - it does this silently and without warning, so if there is a temporary db outage, often due to very heavy traffic, instead of erroring out it refreshes all the theme data from info files and, in effect, disables them.

This is theory, it's a really hard bug to reproduce because it requires a few conditions to occur in the same few milliseconds, but I've observed this behaviour in several versions of Drupal with various sets of modules and themes installed, and never seen a proper resolution.

I would also question the downgrade from critical to normal, as since in my experience this only happens on really busy sites normally - the sort of high profile sites that Drupal needs to be most stable for! (Tends to happen on cron/update to less busy sites on weedy shared hosting, because they are the only actions that can possibly tee up the necessary "perfect storm" to make this happen without any other meaningful traffic, I believe.)

I prepare to stand corrected and be completely wrong, but I'm alarmed this is still present in D7 and I'd urge someone to look more carefully at the theme functions. I'd love to work on a patch to test my theory, but right now I'm up over my eyeballs in other work, and will be until mid-September at the earliest! =(

wellsys_world’s picture

Status: Active » Closed (fixed)

Hi all,

After a lot of messing around with my D7 install I eventually found that the cause was due to the default settings.php having the same database information as one of the other sites in the multi-site setup.

I removed all the keys and values from the $databases array and it's now been OK for about a week.

Thanks everyone

greg.harvey’s picture

Version: 7.2 » 7.x-dev
Assigned: Unassigned » greg.harvey
Status: Closed (fixed) » Active

We're closer to tracking our issue down - it's happening when system_theme_data() is being called in certain circumstances. There are only a limited number of places that happens during normal operation, so we've hacked our core to create watchdog entries every time system_theme_data() is called and provide backtrace info. When it coincides with our drush script having to intervene and re-enable our themes, we'll have some more information. Seems to happen almost weekly, so shouldn't have long to wait.

greg.harvey’s picture

Status: Active » Closed (duplicate)

Finally, a breakthrough. This isn't the right place for it though - new issue: #1331676: Update on cron appears to be disabling themes