How To Get a Drupal Theme Change to Show Up

If you are going to customize a drupal theme or create a drupal theme from scratch, you will inevitably find times where the change you have implemented does not show up. This is because the theme information is cached for better performance. This will happen *even* if you have caching turned off on your site.

So, I will explain how to get a drupal theme change to show up.

There are several ways to get the change to show up:

  • Option 1: Go to your /admin/build/themes page and click "save configuration". This will force the Drupal theme registry to get updated. If this does not work (it should), you can switch to another theme, click "save configuration", and then switch back.
  • Option 2: Install the Devel module and turn on the "Development" block in /admin/build/block. Once the block is available, you can click on the "Theme registry" link (or go to /devel/theme/registry") and the theme will be initialized.
  • Option 3 (recommended): Install the Administration menu module. For the latest version (6.x-1.2), they have a handy link for clearing caches and updating the theme registry. Once the module is turned on, you will see a menu bar across the top of the site. In the left-most menu (with site logo on it), choose the "flush all caches" link.

So now you know how To get a drupal theme change to show up. Kind of annoying that you have to worry about this but at least it's easy to handle.

Comments

Great post, but...

...what if NONE of these things work? I get fresh tpl files when logged in and old ones when logged out, no matter what.

Hmm...

Don't know... clear the cache again? :)

The Answer

You know what the problem was, after all the trouble I went through? Not the template files at all, but permissions. Some of my blocks weren't visible when logged out because they were missing anonymous access permission.

Ugh

Ah... makes sense! Glad you figured it out :)

Short & Sweet

Simple & to the point!

Thanx!

^_^

Post new comment - ALL COMMENTS ARE MODERATED - SPAM WILL BE DELETED!

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.

I'm a Speaker at DrupalCon Austin

I'm a Speaker at DrupalCon Portland