if changes are done to the .info, which is cached also, should be clean as well.
I am trying to submit the patch but I haven't figured out the best way.
By looking at drupal_flush_all_caches() function I am sure that the function zen needs to execute is
system_theme_data();
I tried adding that to the template.php,v 1.44 file in zen's folder having:
// Auto-rebuild the theme registry during theme development.
if (theme_get_setting('zen_rebuild_registry')) {
system_theme_data();
drupal_rebuild_theme_registry();
}
and it seems to work, but only if I realod a page twice, I am not sure about that. I tried registering a shutdown function to clear that part but it breaks things.
I'll post if I look more into it, but it would be a nice/useful improvement.
Comments
Comment #1
cdale commentedThe reason you need to load up a page twice, is because by the time zen's template.php is loaded up, the theme data for the current page requested has already been processed.
Even calling system_theme_data in a modules hook_init() is too late in the request cycle to have the new data used on the current page.
The only way zen could achieve this without requiring two page loads, would be to have a module that implements hook_boot() as these would be the only modules that are loaded up early enough in the request cycle to effect the theme data in time.
Something like the following would be an implementation for this:
Of course, zen is not a module, so it might be better, if adding this feature, to make it very clear in the documentation that two page loads will be required to see changes made in theme.info files. Alternatively, provide a 'zen_themers' module or something that includes the above code.
#308931: Easy & Specific Cache/Registry rebuilding. has a module I wrote that allows a user to clear caches when they want too. It includes all the caches I could find in drupal. The code above is from there, and it does work. It's been quite useful actually. :)
Comment #2
akalata commentedIs something like this still needed? Or should this issue be closed?
Comment #3
hanoiiI think it's still needed, although not sure how to achieve it properly. Having a zen helper module side by the theme is probably too much, isn't it?
Comment #4
johnalbin6.x-1.x is in bug fix mode only.