I have banged my head over this issue all day. I was getting Invalid argument supplied in foreach on line 58 of the ddblock theme. Setting up a fresh install of Drupal seemed to help, but when I loaded my theme ddblock slideshow broke again. I began digging around trying to find what was in the theme that would break it, but could not find anything. I figured out (from the debug info provided by ddblock) that none of the slider_items were being set and all of the slides were blank. This caused the slideshow to simply display white space instead of the slides.
At this point I started digging around in the module code to see why $views_slideshow_ddblock_slider_items was empty. I found that this variable is set on line 309 of the views_slideshow_ddblock.module file and was simply copying $views_slideshow_ddblock_content. I checked that variable expecting it to be blank as well, but it was not! Apparently, there is some kind of issue where the views_slideshow_ddblock_slider_items does not get set by the module! I'm not sure why this is happening, but it does appear to be theme dependent.
Workaround
To get around this issue I simply changed the variable used in the foreach statement that was causing the error ($views_slideshow_ddblock_slider_items) to the variable that it was being copied from (views_slideshow_ddblock_content). After making this change in the ddblock template, the slideshow began to play without any issues.
If anybody knows why the variable would not be set via the module it would probably be a good idea to have a proper fix committed. I was using the Fever Free theme from Antsin if you would like to reproduce.
Comments
Comment #1
ppblaauw commentedThe fever theme has preprocess functions in the template.php file for version 1.x of the views_slideshow_ddblock module.
When you delete these preprocess functions:
and
It should work fine with version 2.x of the views_slideshow_ddblock module.
Hope this helps you further, please let me know.
Comment #2
tms8707056 commentedCan't remember now, but I'm sure that this issue was occurring even after the preprocess functions were removed.
Comment #3
ppblaauw commented