Repairing missing background images in Drupal 6

If you're wondering why the appearance of this site has changed 27 times since yesterday, well, we've been doing some troubleshooting.

I'm still not quite sure how it started, but the custom theme files that give this site its appearance somehow got corrupted last night. This resulted in the site displaying with no background images at times (so everything showed up on white), and no CSS at other times (so it looked like browsing in Mosaic, circa 1994).

What made this one a real bear to troubleshoot was its lack of reproducibility. I keep a few Drupal 6 themes handy for this site- Garland, Minnelli and Bluemarine, as well as the one you usually see (which is essentially Garland with some tweaked CSS). Bluemarine was unaffected. Garland and the custom theme were going haywire- sometimes the background images wouldn't load, sometimes the CSS wouldn't load. Strangely, Minnelli- which is a fixed width subtheme of Garland- was fine, despite its parent being unusable.

Restoring the themes from backups didn't work. All the .htaccess files were fine. All the permissions were set correctly. The excellent techs at GreenGeeks (my hosting provider) searched for corrupted permissions and scoured the logs, and found a clue: a visitor's browser had called for a theme colour folder that didn't exist.

I'm not entirely sure how, but some corrupted CSS had made it into the (supposedly disabled at the time) cache. And despite disabling all the caches and clearing them, something broken kept getting caught in there before I had a chance to install the clean replacement. Every time I tried to fix something, the cached copy would become inconsistent with the files it referenced, and the site would break.

The solution:

  • Switch into a non-broken default theme.
  • Purge the cache.
  • Disable the broken themes and save.
  • Purge the cache.
  • Remove the entire theme from public_html\themes\ or public_html\sites\all\themes, and the custom colour folders from public_html\sites\default\files\color\.
  • Purge the cache.
  • Rebuild the themes locally from known good distributions. Upload them.
  • Purge the cache.
  • Enable the themes. Save.
  • Purge the cache.
  • Set the theme as default and configure it.
  • Purge the cache.
  • Test, then turn caching back to normal settings.

And that eventually did the trick for me- note that restoring without all the cache purges didn't work. Even with all caching supposedly disabled

If you find a similar issue on your own site, here are a few related cases that might be worth reading:




Drupal Pages Not Found

hi sir i got some error messeges my old pages not found only one category how to get my pages in my missing category present new articles are published but old data not showing please give me the best solution admin all permission are enable .

Add new comment