When I set up a new template file according to a view e.g. views-view-fields--news--block-1.tpl.php

in a template folder e.g. sites/all/themes/mytheme/templates/

And then click "Rescan template files", the Theming Information pane disappears and doesn't rescan (the new template file isn't picked up and isn't bold).

Doing the same in Views 2/Drupal 6 works as intended (after clicking Rescan Template Files it 'refreshes' the Theming Information pane and bolds the newly found template file).

Not sure if rescanning is part of Views or Core?

Comments

geocalleo’s picture

I am having the same issue.

I've gone to the following places and have tried clearing cache

admin/structure/views/tools
admin/config/development/performance

and still it doesn't pick up the new view file. Hope this bit of information helps.

* EDIT *
Oh and I also tried checking "Disable views data caching" under "admin/structure/views/tools" but still nothing.

geocalleo’s picture

Okay I think I know what my issue was, I was naming the file with default file naming instead of the page file naming.

So I was doing this "views-view-field--test--default-1--entity-id-2.tpl.php" instead of this "views-view-field--test--page-1--entity-id-2.tpl.php". My apologies for waisting someones time.

th88’s picture

Should point out that I am using Views 3 on Drupal 7 Alpha.

th88’s picture

Update: The template file IS is use - it just doesn't show up as being 'active' (or bold) in Views. Guess this is a bug within Views 3.

didox’s picture

7.0-beta1 release
7.x-3.x-dev

the same problem with rescan

pingo’s picture

Can confirm it's still a problem in views-7.x-3.x-dev, running drupal-7.0-beta2.

mxt’s picture

Same issue here with Drupal 7.0-beta2 release, Views 7.x-3.x-dev

MondayNgt’s picture

I'm having the same issue as well, but it is picking up the template. 7.x-3.x-dev

wbeling’s picture

Same problem here:
Views 7.x-3.x-dev
Drupal 7.0-beta3
#4 I can confirm this too.

mrfelton’s picture

Same problem for me - can also confirm #4, the template does get picked up, but Views just doesn't mark it in bold.

nateb’s picture

Same problem. Subscribing.

sebas5384’s picture

Same problem here!

But i find something funny, if you take a look at the post data of the ajax when you click in the bottom, isn't suppose to pass the name of you custom theme?
in the D6 this is the data:

theme=NAME_OF_YOUR_THEME&form_build_id=form-513be4d422d60155bffd193962450718&form_token=21bbfa2aa4df1fbb8d8ae45051c0c78e&form_id=views_ui_edit_display_form&op=Ok&js=1

but, in the D7 is more like all the commands data of the view. I don't know, maybe i'm just bluffing =P

Cheers!

dawehner’s picture

StatusFileSize
new20.94 KB

It's part of the request, see picture.

Can anyone here can say which template files aren't picked up. Just an example which it's possible to reproduce.

In general views doesn't search for the template file, this is drupal core.

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Can someone explain how to reproduce the issue?

merlinofchaos’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new5.82 KB

This seems to work for me.

dawehner’s picture

Manual testing worked fine already yesterday.

Manual testing today worked fine again. The code looks fine.

This part of code is quite cool to detect all base themes

+          while ($ancestor && isset($themes[$ancestor]->base_theme)) {
+            $ancestor = $themes[$ancestor]->base_theme;
+            $base_theme[] = $themes[$ancestor];
+          }

But this will need reverse. The rest looks fine and is just a copy.

dawehner’s picture

Status: Needs review » Fixed

Added a array_revere

Commited to the 7.x branch.

Status: Fixed » Closed (fixed)

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