jQuery 1.3.2
jQuery UI 1.7.3
jQuery Cycle 2.99
Drupal 6.22
Views 6.x-3.x-dev
Views Slideshow 6.x-3.x-dev
I am getting the following error "Drupal.settings.viewsSlideshowPager[options.slideshowID].top is undefined".
the view is embedded on a node using
"function template_preprocess_node(&$vars, $hook) {
// Render the view.
$vars['department_ads_view'] = views_embed_view('department_ads', 'block_1');
//Reload the javascript into the scripts.
$vars['scripts'] = drupal_get_js();
}"
and then printed on a custom page.tpl like so
"
print $department_ads_view;
"
I have also tried the same on template_preprocess_page, and also using views embed directly on the node.tpl, all with the same results.
How can I resolve this problem
here is the Drupal.settings javascript from the src
"
"| Comment | File | Size | Author |
|---|---|---|---|
| #24 | views_slideshow.js_.txt | 21.52 KB | Nicholas Cook |
| #19 | views_slideshow.js_.txt | 19.5 KB | webatelier |
| #14 | views_slideshow-pager_undefined-1200096-14.patch | 1.54 KB | ianabc |
| #11 | views_slideshow.js_.patch.txt | 1.54 KB | oliver huynh |
| #1 | Drupal.settings javascript.txt | 7 KB | valderson |
Comments
Comment #1
valderson commentedattached Drupal.settings javascript
Comment #2
valderson commentedcan anybody give a tip and how to resolve this?
Comment #3
valderson commenteddowngrading to 6.x-3.0-beta1 has made the errors go away
Comment #4
Roulion commentedI also encounter the issue
settings.targetId = '#' + $(fullId + " :first").attr('id');
the strange pointe is that when i look at my home page (http://www.afterfoot.fr) as an anonymous, i have the error (the page is served by boost). When i'm logged in, the error desappears
Comment #5
manos_ws commentedExactly the same problem.
And its not boost related. Only appears for anonymous users.
Views 6.x-3.x-dev (2011-Jul-13)
Views Slideshow 6.x-3.x-dev (2011-Jun-27)
viewsslideshow.js
Line 142
Drupal.settings.viewsSlideshowPager is undefined
Comment #6
manos_ws commentedFor the comment I made above I would like to say that now I have the same problem for logged in admin user, not just anonymous
Thanks
Comment #7
redndahead commentedUsing the latest of each module with all caching turned on I can't reproduce this issue. Can you check with the latest version of everything?
Comment #8
ayntree commentedI'm also getting this syntax error..
Comment #9
alioso commentedI am getting this on Drupal 7 as well. Tried everything to make it go away with no success
Comment #10
protoplasm commentedIt's an error that's triggered on line 1283 of the jquery javascript library 1.3.2 and you won't notice it unless firefox's error console is enabled. Then the entire page freezes in firefox and you can't not notice it. Here's the offended line:
if (typeof Drupal.settings.viewsSlideshowControls[options.slideshowID].top.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowControls[options.slideshowID].top.type].pause == 'function')I've tried the easy work arounds without luck...except one-->
If you unclick the pause on hover button, the error is not triggered. It's only triggered when the mouse hovers...at least on my site.
but... Once that's fixed, another error at 1382 is tripped even with the hover unclicked:
if (typeof Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type != "undefined" && typeof Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type].transitionBegin == 'function') {
Drupal[Drupal.settings.viewsSlideshowPager[options.slideshowID].top.type].transitionBegin(options);
so if you then click the top pager checkbox, this error goes away and then it triggers yet another error.
So it would appear that the errors are related to the state of the controls?
(I'm getting these errors in views slideshow 3.0. )
Addendum: I've had to revert to vs 2.3 to get functionality without throwing javascript errors.
Comment #11
oliver huynh commentedPatch is attached. This JS error is simple to fix.
Comment #12
eric.chenchao commentedThanks @oliverhuynh. Still got errors caused by typeof Drupal.settings.viewsSlideshowControls is undefined in FF
Need to change
to
and
to
Comment #13
mark@redhorseinteractive.com commentedThanks. I am having the same problem but this code change still did not resolve this error. Any other ideas. Do you think it is a version of the code that is being used?
Obviously Views Slideshow works for some people?
Comment #14
ianabc commentedI'm having the same problem with the following setup
drupal: 7.15
views: 7.x-3.3
views_slideshow: 7.x-3.0
jquery: 1.4.4
jquery.ui: 1.8.7
jquery.cycle: 2.9999.5
If I have firebug running and I reload the page with the slideshow on it the page load hangs with the following error in the firebug console:
Drupal.settings.viewsSlideshowPager[options.slideshowID].top is undefinedThe piece of code throwing the error is:
If I do something similar to comment 12, then clear all caches,
then I can avoid the error (patch attached).no improvementComment #15
jwjoshuawalker commentedTurning off jQuery Update module fixed this for me.
Comment #16
jwjoshuawalker commentedWoops, I'm sorry no it didn't. Chrome dev & Firebug just weren't reporting it for the first few times. It did make some other things work more 'properly' though.
Comment #17
anybodySame problem here. This is quite critical, because it leads to other JS disfunctionality on the page. The issue is already open for too long.
Adding the following statement fixes the issue firstofall.
Drupal.settings.viewsSlideshowPager != undefined && ...Comment #18
webatelier commentedi applied several (if not all) patches from this thread and think i solved it for now
to avoid others having to re-read this thread 5 times,
full patched views_slideshow.js file in attach
hope it works for others too ? please review
edit : file in post below
Comment #19
webatelier commented2nd try to attach file
Comment #20
anybody@#19
Will this patch be integrated into the next release? Could you perhaps contact the maintainer?
I'll set this as reviewed & tested by community.
Comment #21
webatelier commentedi think this needs more reviewing from professional coders (=not me !)
I only assembled the different bits of code and found (i think) a solution by trial and error ...
Comment #22
anybodyComment #23
MVRider commentedI have the same issue on 3 production sites. Has anyone else found a solution that works? Seems like many users have seen this issue.
Comment #24
Nicholas Cook commentedI was also getting this error...I've modified the view_slideshow.js even more and I'm not getting the errors in FF.
Comment #25
jchmura commentedI'm not sure if this will help anybody, but I managed to solve this problem with a slight tweak to my views settings. In the "Pager" options, I changed it from "Display all items" to "Display a specified number of items". Under the settings/options for "Items to Display", I set it to 0 (for no limit). This eliminated the error for me, and my site is running more smoothly now as a result. It appears that this error may be related to a programmatic ambiguity of "all items" when using that options? I hope that this helps somebody else.
Comment #26
fboulangerjchmura, I'm trying your "Display a specified number of items" to 0 solution, but I always got the same problem...
the webatelier patch doesn't work too.
Maybe a solution that work for the moment :
I activate the 'paginations' and 'controls' (top and bottom widgets) in the widgets options of the slideshow parameters in views. then I hide this with css.
hope this help until a debug will be found.
Comment #27
ivanhelguera commentedI can confirm the issue. It also makes the whole site horribly slow when FBug is on - which makes things really difficult. Tried to upgrade to a dev version, limiting the items, and showing pager - nothing changed. Drupal 7.22, Views Slideshow 7-3.0
Comment #28
wangqizhong commentedThanks a lot to valderson, Oliver Huynh, cityreader, ianabc, webatelier, Nicholas and everyone else for the great work on the patches, testing, reviews and reporting.
It's more time this got committed and I went ahead and had this rolled at:
7.x-3.x: 1333ea2
6.x-3.x: 12cadcf
Marking this as fixed.
Please let me know if you would have any other questions, comments, issues or concerns on any of these changes, I would be glad to provide more information.
Thanks again to everyone for the help and great work on this issue.
Cheers!
Comment #29
ivanhelguera commentedDoes that mean that using the latest dev version will solve the issue?
(and a great thank you to all people involved !)
Comment #30
wangqizhong commentedYep, Thanks for your support, if you have any questions please feedback.