I'm trying to set up this module for the first time and I am having trouble using the 'Thumbnailhover' mode -- primarily wanting to use this mode to be able to specify imagecache presets for my thumbnails.

I have set up my view, and confirmed the module is working as expected when using 'SingleFrame' mode. However, when I change it over to 'Thumbnailhover' and reload the slideshow page, none of the content is loaded. The controls are loaded, and any field labels I have defined are displayed, but absolutely none of field content is loaded. I confirmed that this is not simply a CSS or JS issue as the markup produced by the module in fact does not contain my node field content.

I flagged this as a support request -- I am not sure if this is simply a misconfiguration of something on my end, or if it is possibly a bug. My View 'Row Style' is set to 'Fields'. If anyone can point me in the right direction on this I would sincerely appreciate it.

Comments

intyms’s picture

If you change to Thumbnailhover, please be sure to check the necessary fields inside "Main frame" and "Breakout".

ISPTraderChris’s picture

I have checked the fields for "Node Title" and "Image" in the "Main Frame" and a second "Image" (for thumbnail) in the Breakout. Even with these settings in place, the markup in Thumbnailhover mode is empty of content whereas in SingleFrame mode it is not.

redndahead’s picture

Do the thumbnails show?

ISPTraderChris’s picture

The only thing that shows when I switch to 'Thumbnailhover' mode are field labels (if I don't leave them blank) and slideshow controls (prev,pause,next) and page numbers. Interestingly, there are 3 slides corresponding to the 3 items that should be showing, and per the pager they are rotating through. But there is nothing displayed, and nothing in the actual markup (relating to field contents). Again, this all works fine in normal 'SingleFrame' mode (with and without the pager set to thumbnail).

I'm at a bit of a loss as to why this would work in SingleFrame mode but not in Thumbnailhover.

ISPTraderChris’s picture

After some debugging, it would seem the following expression is causing the issue:

$rendered_fields .= $view->style_plugin->rendered_fields[$count][$field];

This expression is returning a NULL value when it should be returning the field content and adding it to the markup. I am not (yet) familiar enough with the view object / views api to understand why. Any thoughts?

redndahead’s picture

Is there a site to look at? Can you tell me what the $count and $field are? Can you tell me what values are in $view->style_plugin->rendered_fields?

ISPTraderChris’s picture

The values present in $field are 'field_product_images_fid' and 'field_product_images_fid_1' -- these are CCK Image Fields. The values for $count cycle from 0 through 2. There are three items in my view so that makes sense. I should probably also mention that my Images field allows multiple values, but that the view is set to 'group' the values and only select the first value (delta 0).

It does not appear that $view->style_plugin->rendered_fields nor $view->style_plugin exist (isset returns FALSE on both counts). I'm running Views v2.6.

Unfortunately I cannot provide a link to the site at the moment. But I can tell you that the markup includes the basic wrappers for the module, but does not include the field content -- which makes sense given the null value returned. I took a look at the SingleFrame theme file and I can see that the field content is retrieved in an entirely different way for this mode.

ISPTraderChris’s picture

After some digging, I found this thread #389428: row field variable names not created properly where merlinofchaos points out that the best practice to reference $view object field data by field name and row is: $view->render_field($field, $count)

There are two instances in the Thumbnailhover theme file where this replacement would be made. After replacing "$view->style_plugin->rendered_fields[$count][$field]" with "$view->render_field($field, $count)", my issue was fixed and my field content is now displayed.

redndahead’s picture

What the heck. I asked him personally at drupalcon what was the best way and that's why it is the way it is. Views Cycle does it the same way. I'll need to investigate more.

redndahead’s picture

Status: Active » Postponed (maintainer needs more info)

What version of views are you using?

ISPTraderChris’s picture

I'm currently running Views v2.6

I've now been running Views Slideshow with Thumbnailhover mode enabled without issue for about a week now using the modifications I noted above.

redndahead’s picture

Status: Postponed (maintainer needs more info) » Fixed

Sorry I guess I didn't read all of your previous post where you said what you were running. It seems $view->style_plugin->rendered_fields exists in views 2.7+ I'll make a note on the home page that version 2.1 of thumbnailhover requires views 2.7+

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

willeaton’s picture

This should not be closed, in no version of 6.x-2 is the change in comment #8 implemented. By implementing this, the thumbnailhover option actually works

Thanks
Will Eaton