When using http://drupal.org/project/lightbox2 with Views Carousel, the images just link to the images instead of opening up the Lightbox. Changing Wrap Content to Disabled works as expected.

-Tim

CommentFileSizeAuthor
#16 viewscarousel.zip1021 bytesarbel
#6 viewcar.JPG33.54 KBRoze-1

Comments

Kakulash’s picture

I am experiencing this as well.

No idea what's wrong though.

Term1nator’s picture

I have the same problem.
Has anyone managed to get this working?

nwom’s picture

subscribe

Justin Lee’s picture

I have the same problem too.
How to get it working?

mfer’s picture

Status: Active » Postponed (maintainer needs more info)

I can verify the problem. This module is really a wrapper for the jcarousel library. I'm not sure there is a simple solution to this problem. Does someone have a patch? If not, I'm going to mark this work fix. The path either needs to be against the jcarousel library or an add on solution to the module. If against jcarousel it should be posted against their repo.

Roze-1’s picture

StatusFileSize
new33.54 KB

Do you guys get error like in the Screenshot?

mfer’s picture

@prasanthloganda does this have to do with lightbox2?

Roze-1’s picture

Sorry i have no idea. But when i delete the lightbox2 module from my website holder the slide-show suddenly got disabled. The screen-shot above was taken with lightbox2 module. I hope some bug is in the script.

mfer’s picture

@prasanthloganda without seeing the site or more information about the configuration I cannot reproduce the problem to see what's going on.

arbel’s picture

I can confirm this problem

1. setup a views carousel, with circle wrap.
2. have a an image field in the view set to any lightbox2 setting (iframe,slideshow,regular)

if you click on the image, it will go directly to the link, and not open it in lightbox.
disable the wrap, and it works fine.

could be an issue with the same node appear multiple times with the same id or something like that?

Idan

essbee’s picture

I also have this behaviour. Using a php code block to create carousel. If carousel is circular wrap lightbox doesn't operate.

julien66’s picture

Hello.

I have the same problem.
I need to give a deeper look since I didn't figure out what's wrong at glance.
I created a simple page where you can compare a working version of the lightbox inside a caroussel (no wrap) and bad version of the lightbox when the same caroussel has a wrap (circular in that case but any wrap cause problem).

http://webhouse-fr.com/node/16

Strange problem anyway.
Good luck !

arbel’s picture

I've tried to debug this, and couldn't come to any conclusion or fix, but I've noticed the the jcarusel loads new html when it wraps, this could be a problem for the lightbox, i've tried calling Lightbox.initList(); after each html is inserted but this didn't do much.

this could be an issue with the way the click handler is applied and the wrap creates duplicate items, but my js skills arn't up to par to fix this.

Idan

Kristaps.Zakis’s picture

I have thesame problem using views carousel with circular wrap content.

It have the same errors with lightbox or shadowbox.
BUT it works in Firefox 3.6.10
All other browsers I tested (Opera, Safari, IE8, Chrome) just open a blank page with image.

Another thing:

If I manage to click on sliders image before page fully loads, it also opens lightbox, shadowbox (tried both), but after that again if I click to image it links to blank page with image.

Hope this is helpfully.

hedac’s picture

subscribing to this...
I was getting crazy not realizing that I checked the wrapping and I was sure it was working before... so for now.. will uncheck wrap... sorry I have no idea how to solve this.

arbel’s picture

StatusFileSize
new1021 bytes

I've managed to fix the issue. really more of a serious hack by someone with not so very good js skills - me.

The problem was that the wrap was loading the images that were already processed by lightbox, so it ignored them the second time around that they are loaded- actually it doesn't even know to look for new images.

so I did two things
1. removed the .lightbox-processed class right before loading the html for the wrapping images.
2. reinitialized lightbox to add the click action to them.

line 38 of viewscarousel.js

function viewscarouselItemVisibleInCallback(carousel, item, i, state, evt) {
var idx = carousel.index(i, viewscarouselHTML[carousel.options.viewscarouseluuid].length);
//remove the class so that lighbox will add click
deLightbox = $("a", viewscarouselHTML[carousel.options.viewscarouseluuid][idx - 1]).removeClass("lightbox-processed");
carousel.add(i, deLightbox);
//tell lightbox to rescan images
Lightbox.initList();
};

this doesn't take into account a situation where there is no lightbox module installed, and I haven't tested this so I have no idea what would happen.

attached is the updated file.

good luck.

Idan

rubenvarela’s picture

I have the same problem and the solution on #16 works great.

I simply commented out the lines 38 to 41 and added just below the code from #16.

I tried to see what would happen when not used with the Lightbox2 module, and nothing is shown.

cleverhoods’s picture

#16 works great
thank you