The S-Files: "Help I deleted my theme"

Tech Support Case Studies
One of the core services that Acquia offers is support for people building sites with Drupal. "The S-Files" are stories about the day-to-day life of our support team. Each one contains a nugget of Drupal knowledge that helped a customer succeed with Drupal. Enjoy!
"Hello, I installed a new theme on my site but I didn't like it. So I deleted it. Now I can't log into my site and it really looks broken."
That's the message that appeared in my email inbox. It was a voicemail message that a customer had left after calling our support hotline: 1-888-9-ACQUIA. Using my voice-over-internet softphone I dialed the number that the customer had left. Initial response time - 8 minutes.
The symptoms were as he had already described. After deciding not to keep the new theme he had simply deleted the folder from the sites/all/themes directory. The pages, which were still being served from Drupal's page cache, had the markup of the deleted theme (cached), but no images or CSS. This was, of course, very confusing. Here's the way to handle the situation:
- Go to http://example.com/?q=user and log in. You may have to type this into your browser as one of the side effects of killing your theme is the absence of navigation links.
- Go to http://example.com/?q=admin/build/themes and select one of the existing themes. Enable it and make it your default theme.
When you visit admin/build/themes Drupal re-scans the directory where themes are kept and notices if you have added or deleted themes. When it notices that the previously selected default theme is missing, it will pick another. At this point the site should look normal again.
In the future, the customer will now disable unwanted themes from the admin interface before deleting the files (this goes for modules, too). I also advised him to keep a short list of handy URLs (like the ones above) to get to various useful corners of the site in case something goes wrong in the future. Case closed!
Related Content
AcquiaBlog

2010 has been an inflection point for the Acquia partner program. We are doing more business than ever with partners, including case studies with Palantir.net, Blink Reaction, and IBM Global Services.
Bryan House
It is that phase of my life! I'm just turning 30 in a month, working with Drupal for 7 years and just had my third Acquia anniversary a week ago. Time to look back and evaluate how things went, all the good and bad things; even better if the wisdom can be shared with others. This was part of my thinking when I submitted the session titled "Come for the software, stay for the community" for Drupalcon Copenhagen.
Gábor Hojtsy
It sounded like a really simple request: "Is it easy to add a search filter for 'My posts'?". In other words, add a search result facet for posts by the current (logged in) user through the Apache Solr Search Integration module APIs?
But then the wheels start turning - we want not just one blind link, but a real facet link that tells us how many results we'll get. Also, if we are filtering by 'My posts' then we probably have an equal use case for the opposite filter 'Posts not by me'. So we really need a facet block with two links and facets counts.
Peter Wolanin






