My site started having a javascript error in the views slideshow sometime this week, I'm not sure what changed, it had been working fine for months. The javascript error prevents the rest of the JS on the page from loading breaking the site.
The slideshow just output each slide stacked on top of each other on the page.
firebug says: "Drupal.settings.viewsSlideshowPagerFields is undefined"
chrome says: "Uncaught TypeError: Cannot read property 'slides-block_1' of undefined" views_slideshow.js:262
The odd thing is if I clear all caches, then try loading the site in another browser it loads fine the first load, but soon as I refresh the page its broken again.
I tried editing the view to disable all the pager options. This stops any javascript errors from loading, but the slideslow doesn't work, slides just all output to the page stacked. The slideshow always works fine in Chrome when i'm logged into the site, but its broke in FF and IE.
I had to disable the slideshow on my site so the homepage can load, so I attached the html output to this post for debugging and I made the slideshow block visible on this page
http://www.trailforks.com/node
I should also mention i have had JS aggregation off for months with views working fine. But I did disable it and clear caches during my troubleshooting.
Comment | File | Size | Author |
---|---|---|---|
www.trailforks.com_.txt | 60.67 KB | Canadaka |
Comments
Comment #0.0
Canadaka CreditAttribution: Canadaka commentedadded more info
Comment #0.1
Canadaka CreditAttribution: Canadaka commentedadded url
Comment #1
Baysaa CreditAttribution: Baysaa commentedSame here, for some reason the cached html files (Boost) do not have the following 2 lines:
[script src="http://www.example.com/sites/all/libraries/jquery.cycle/jquery.cycle.all..."][/script]
[script src="http://www.example.com/sites/all/modules/views_slideshow/contrib/views_s..."][/script]
Comment #2
gboggs CreditAttribution: gboggs commentedI disabled block caching on the view and it worked for me.
Comment #3
davidneedhamYup, block caching is the reason for this error. Anyone have an idea for a patch for the module? Seems like it'd be nice to be able to cache the slideshow.
Comment #4
nilsbunger CreditAttribution: nilsbunger commentedWe just hit this as well on drupal 7.22. Disabling block caching worked for us as well.
Strangely the site seemed to work for about a month with slideshows before this error hit us. I'll post an update if we learn any more. I'd also love to hear of an update that addresses this properly.
Comment #5
davidneedhamI agree, it was somewhat unpredictable for us too. It wasn't until we pushed a change to the site that we started seeing this happen. Sometimes clearing Drupal's cache and browser cache would make it go away. Other times, nothing would make it go away.
Comment #5.0
davidneedhamadded info about js
Comment #6
NickDickinsonWilde