I've notices that, once in a while, the "Rescan template files" button (introduced here, by me) doesn't seem to work: the list of template files doesn't get refreshed. I've tracked down the bug: theme_get_registry() uses an internal cache that needs to be cleared.

I'm attaching a patch.

CommentFileSizeAuthor
rescan.diff1 KBmooffie
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mooffie’s picture

Now for a fine moment of trivia:

I explained in the inline comment that theme_get_registry()'s cache is initialized before Drupal executes our submit handler. This happens because when Drupal builds this specific form it initializes the theme system. And *this* happens because there are 'markup' elements in the form that call various theme functions ('item_list' in our case).

merlinofchaos’s picture

Status: Needs review » Fixed

Nice work!

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.