I have come across what seems to be a bug in the ThumbnailHover option. I have four fields: a URL textfield that points to a video file, a large thumbnail, a small thumbnail and some description text. Outputting these fields as they are works fine - I see all the correct data for each node. However, when I rewrite the large thumbnail field to use the URL textfield so that when its clicked, it plays the video in a Lightbox, it pulls in the URL textfield from the preceding node. If its the first node, then it uses the last node's URL. If I still keep the URL field as an output field, it shows the correct URL, so its only on a rewrite, that something goes wrong.
If I then switch the View style to a regular HTML list or even the SingleFrame VS, everything works fine again. It just seems to be with this one version of VS. All caches have been cleared multiple times, and it happens in Chrome as well as FF. I also tried the 2.x-dev version, but its still doing it. So far, the only way to bypass this problem is to use SingleFrame mode and overlay the auto-generated thumbnail from the larger image with the small thumbnail image using CSS. Not ideal, but it should work in theory.
Has anyone seen this before? Or am I doing something wrong (don't see how though)?
Comment | File | Size | Author |
---|---|---|---|
#17 | 793934-render-4.patch | 5.98 KB | redndahead |
#13 | 793934-render-3.patch | 5.89 KB | redndahead |
#10 | 793934-render-2.patch | 4.7 KB | redndahead |
#8 | 793934-render_patch-1.patch | 4.59 KB | redndahead |
Comments
Comment #1
intyms CreditAttribution: intyms commentedyou can use Global: Custom text field to achieve the desired result.
maybe its not the best solution, but i guess it can solve your problem.
Comment #2
sethcohn CreditAttribution: sethcohn commentedIt looks like there is definately an off by one error someplace. I just discovered the same/similar issue: rewriting a field (to combine items) would end up with some info from the current result row, but some from the previous result row.
Changing from Slideshow to HTML List, the combined rewritten fields are correct (AA BB CC), then switching back to Slideshow, I end up with A (The Main Item) and thumbnails with AB BC CD DE EA (or something like that... you get the idea)
I'll see if I can track it down now... this is a pretty major bug and I need this functionality.
Comment #3
sethcohn CreditAttribution: sethcohn commentedOk, narrowed the problem down to how it occurs:
If you set up your rewrite to use the _current_ field, something gets confused, and will start using the previous field(s)... I believe (after some quick glance at the code in views_slideshow_thumbnailhover.theme.inc that due to the field(s) in question being displayed or not, combined with trying to change the existing field into a rewritten field (ie change field B3 to become B1-B2-B3) and it's falling back to the previous field values (ie B3 becomes A1-A2-B3 or B1-B2-A3, not sure which is the case here, still debugging under a time crunch to just get it working) which aren't being reset to empty inside the loop.
This is why using a fresh "custom text" field fixes the problem: it's not part of the field mix that it ends up becoming so it's exempt from the confusion and misloading of older values.
Comment #4
davemybes CreditAttribution: davemybes commentedNice idea, and it actually now links to the right video for the thumbnail, but the main image is the one that is wrong now, and pulls in the previous node's image.
Comment #5
sethcohn CreditAttribution: sethcohn commentedYes, it's still got an off by one error someplace.
If you dump the view->result (or rows) the order is as expected, but somehow the items rendered in the breakout are incorrectly, with the last item _first_, throwing the entire breakout off by one.
Comment #6
sethcohn CreditAttribution: sethcohn commentedAnd this is a code error, not an user interface error, so please don't change that.
The display is wrong, but it's clearly someplace in the code that needs to be fixed, not a interface problem.
Comment #7
sethcohn CreditAttribution: sethcohn commentedThe off by one error is solvable by following directions here:
http://drupal.org/node/774056#comment-2917816
"Exclude the fields that are in your custom text
and you will need to check the boxes to include those fields in the slideshow."
If you don't check to include the fields in the slideshow, the theming function grabs incorrect info, leading to the 'off by one' error. I narrowed the problem down to
Which pulls the wrong info as a result, despite being given the correct node.
(passing it the first node, it ends up returning the _last_ node's rendering instead).
Checking all of the fields used in the custom text eliminated this, returning the correct field/node rendering.
Hopefully the patch mentioned there in #774056: Thumbnail Hover - main frame ignores views tpl override as 'in a future release' will truly solve this. Not marking as duplicate, as that issue is already closed (and a support request).
Comment #8
redndahead CreditAttribution: redndahead commentedCan you see if this patch renders items better?
Comment #9
davemybes CreditAttribution: davemybes commentedDidn't mean to change the category - I think I had my reply open and then you posted a couple of messages, changing the category, so when I eventually saved the reply, it looks like it changed it back. Anyway, thanks for the custom field clarification, I wasn't using it as the final output field,
The patch seems to do the job! Thanks.
Comment #10
redndahead CreditAttribution: redndahead commentedFriends don't let friends write patches when tired. This should be a better patch, but I'm glad it's working.
Comment #11
sethcohn CreditAttribution: sethcohn commentedYes, that patch works, and removes the (incorrect IMHO) requirements that items be included on the slideshow itself even if not displayed. It introduces a bit of a confusing conflict of options in that you can mark a field as "Exclude from display" and if checked in the slideshow settings, it will appear anyway... But this is still better than the unpatched version.
+1
Comment #12
redndahead CreditAttribution: redndahead commentedThanks for testing. Yeah this makes marking exclude from display not really necessary anymore, but maybe in the future I can make it so that if an item is marked excluded from display it isn't an available checkbox in the slideshow settings.
Comment #13
redndahead CreditAttribution: redndahead commentedActually was easier than I thought. Can you please review this one which removes the field from the slideshow settings if it's set to be excluded.
Comment #14
sethcohn CreditAttribution: sethcohn commentedoops, changed version incorrectly. Patch is for 2.x-dev...
Comment #15
sethcohn CreditAttribution: sethcohn commentedOops... found a bug in patch-3
given field A, set it for visible.
Set slideshow to display it (checkbox).
Now set field A as not visible for display.
Checkbox for slideshow vanishes, but field is still used (and visible)
You should display all checkboxes, but maybe make them disabled (uncheckable), and ensure the value is forced to not usable?
Comment #16
redndahead CreditAttribution: redndahead commentedThis is going to be tough. To make it not display you would have to resave your settings. I can see about checking if the field is excluded before displaying.
Comment #17
redndahead CreditAttribution: redndahead commentedDon't listen to me when I say it's tough. I just cut out more than I should have.
Comment #18
redndahead CreditAttribution: redndahead commentedPatch committed.