Posted by morningtime on May 31, 2011 at 7:05am
6 followers
| Project: | Views Slideshow |
| Version: | 7.x-3.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi,
with views you can select under Theme Information the custom template file. I've copied the original views-slideshow.tpl.php to my custom views-slideshow--featured--pane-featured.tpl.php
It works after you flush the cache. But only once. If you refresh the page (F5), then you get these errors:
Notice: Undefined variable: skin in include() (line 16 of C:\Inetpub\wwwroot\123.com\sites\all\themes\andalusiah\templates\views-slideshow--featured--pane-featured.tpl.php). => > Notice: Undefined variable: slideshow in include() (line 24 of C:\Inetpub\wwwroot\123.com\sites\all\themes\andalusiah\templates\views-slideshow--featured--pane-featured.tpl.php). => The problem is that $skin and $template are no longer available in the custom tpl file. If you refresh caches one more time, again it works. But again only once - after you refresh the page again, same errors appear.
I'm showing this view as a content page within panels, but issue does not seem related to panels. It probably points to a tpl file caching issue.
Comments
#1
I found a strange solution: copied the function
template_preprocess_views_slideshowto my template.php ("mytheme_preprocess_views_slideshow"). Then the problem went away.This shouldn't be necessary, should it? Why would it work after the first page-load, but not after that?
#2
I can confirm this whacky behaviour and the temp fix
#3
subscribing. same issue here.
#4
This may be a views issue. Views is what creates the theme function for that. Not sure what it may be on my side.
#5
Apparently drupal cannot handle preprocess files in theme.inc files. I'm working on it. Pretty much have to move the preprocesses to the .module file.
#6
This patch was committed.
#7
Automatically closed -- issue fixed for 2 weeks with no activity.
#8
redndahead, where did you find the information about the theme.inc vs .module file?
#9
I think crell told me in irc.