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.

CommentFileSizeAuthor
www.trailforks.com_.txt60.67 KBCanadaka
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Canadaka’s picture

Issue summary: View changes

added more info

Canadaka’s picture

Issue summary: View changes

added url

Baysaa’s picture

Same 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]

gboggs’s picture

I disabled block caching on the view and it worked for me.

davidneedham’s picture

Yup, 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.

nilsbunger’s picture

We 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.

davidneedham’s picture

I 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.

davidneedham’s picture

Issue summary: View changes

added info about js

NickDickinsonWilde’s picture

Issue summary: View changes
Status: Active » Closed (outdated)