I was "auditioning" some themes, and one of them was causing fatal errors bad enough that Drupal would not load. Nothing showed up except a fatal error (at line 179 of theme.inc, with Drupal 4.3.1, if anyone cares)
This leads to a sort of catch-22: I could not load Drupal because of the broken theme. But I could not change the theme because I could not load Drupal. So how can someone recover their site if they've installed a theme that turns out to be broken?
I ended up loading the Drupal DB in MySQL, tracking down the default theme setting in the variables table, and changing it to something else. If I didn't know SQL, would I have just been screwed? Or is there some kind of "safe" mode I don't know about that'd bypass the theme somehow?
Comments
Rename the theme folder
There is some code that makes sure that the default theme exists, and if it does not, then it loads the default theme. So, just rename the theme folder to something else.
I had the same problem, and I did what you did.
back back back
Next time it happens (god forbid) don't panick! Hit the back button in your browser until you return to the select theme option and select something else. It has worked for me. (Btw. was the Marvin_2K theme, as I recall, in my case. Beware.)
Of course, maybe the rename trick works, but I think it is easier to go with my suggestion. Works quite often, if you mess with something you regret :-)
Another solution
Another way out of the broken theme problem:
Move the broken theme out of the theme folder. Drupal will revert
to a default theme.
I did not have to edit MySQL tables to get out of trouble.
Yes...
Hi,
I would add this one also, but it was already there. I have been there also and this is the easiest solution. Remove the theme which is causing the error and everything is back to normal.
Grtz. Henk
WebSite powered by Drupal: http://pd5dp.ham-radio.ch
Other WebSite : http://www.qsl.net/pd5dp
Email:
pd5dp@amsat.org
I have the problem at the
I have the problem at the moment.
My theme is broken and I can't access the site. It's causing a server error.
I removed the theme but now I get only a white page. There is no fallback to a default theme.
Where can I change this in the database?
Thanks for help!
Got it! I set the default
Got it! I set the default theme in the config file, changed the theme and removed the default option.
Recover site from broken theme
In /default/settings.php find and uncomment this line $conf['theme_default'] = 'garland';
If necessary change the default theme to bartik or whatever is not broken