I'd like to define a custom template for one of my views, but when I clicked "Rescan template files" it didn't didn't find the file. I realised I'm using a separate admin theme, and so put the file in the admin theme folder & it found it!

This means that when Views rescans for template files, it only looks in the folder of the currently displayed template. I would think best practice would be to rescan the default theme, rather than the current admin theme!

Comments

amanda267’s picture

Version: 6.x-2.0 » 6.x-2.2
Priority: Normal » Critical

Same experience here - I think this is a critical views bug - currently using the latest 6.x-2.2 version of views

tonycaine’s picture

I had the same experience here Also using 6.x-2.2 version of views and using drupal 6.4

Upgraded to drupal6.8 after seeing '#333060 by neclimdul, merlinofchaos, dvessel: child themes did not inherit patterns correctly, so more specific template files are not detected' because was having issues with a sub theme of zen.

This (for me) has fixed this issue. That is, while using 'pushbutton' as admin theme and using a child of Zen and the templates from that child are now used. eg. '\sites\all\themes\zen\blackie\views-view-field--podcasts--title.tpl.php'.

THANKS.

However, in the edit page for the view, the rescan does not show these templates if i don't have them in the pushbutton dir.

IncrediblyKenzi’s picture

Experiencing the same.

A quick workaround is to select the appropriate theme to configure in the "administrative theme" panel, then edit your view, then switch it back.

Hope this helps someone.

akalsey’s picture

A workaround is to re-scan the theme files in a different way. Go to your themes admin page (admin/build/themes) and hit Save Configuration at the bottom. Even if you haven't changed the config, it will rebuild the theme registry and your changes will be picked up in all themes.

semireg’s picture

This has wasted 10 hours of my life.

febbraro’s picture

subscribe

blackdog’s picture

Status: Active » Closed (duplicate)