Lightbox not working
Permalink Browser Info Environment
When I add a gallery to a page, it shows up in the right size and order, but clicking the thumbnails just opens them in a new page rather than a modal window.
Also, when I go back to edit mode in that page, it's disabled--I can't click anything to edit it, or to add to blocks, and the only way out that I can see is to delete the page and start over.
The REALLY weird thing is that I'm simply copying a gallery from one site to another, using exactly the same photos and exactly the same settings, and on the first site it worked fine. What gives?
Also, when I go back to edit mode in that page, it's disabled--I can't click anything to edit it, or to add to blocks, and the only way out that I can see is to delete the page and start over.
The REALLY weird thing is that I'm simply copying a gallery from one site to another, using exactly the same photos and exactly the same settings, and on the first site it worked fine. What gives?
Type: | Discussion |
---|---|
Status: | New |
Thanks, Jordan. I am in fact using another Fancybox-type addon, Fancy Forms Template (http://www.concrete5.org/marketplace/addons/fancy-forms-template/). The only javascript the theme is calling separately is iepngfix_tilebg.js.
The URL ishttp://www.1stdesignbrigade.com/concrete/about/...
The URL for the first site, where the gallery is working, ishttp://www.pizzeriaritrovo.com/about/...
The URL ishttp://www.1stdesignbrigade.com/concrete/about/...
The URL for the first site, where the gallery is working, ishttp://www.pizzeriaritrovo.com/about/...
That is most likely the cause of the problem. You can confirm this by temporarily removing the fancy forms template from your page and seeing if the gallery works then.
If this is the case, you'll probably just want to use the fancy form template's copy of FancyBox since that is on every page already. So you can disable the Gallery's fancybox by editing this file:
packages/sortable_fancybox_gallery/blocks/sortable_fancybox_gallery/controller.php
and around line 15 or so you should see this:
...change that to this:
That should do it.
-Jordan
If this is the case, you'll probably just want to use the fancy form template's copy of FancyBox since that is on every page already. So you can disable the Gallery's fancybox by editing this file:
packages/sortable_fancybox_gallery/blocks/sortable_fancybox_gallery/controller.php
and around line 15 or so you should see this:
public function on_page_view() { if ($this->enableLightbox) {
...change that to this:
public function on_page_view() { if (false) { //disabled to avoid conflict with Fancy Form Template addon
That should do it.
-Jordan
That was it. From dead in the water to back up in an hour. Not too shabby.
Hi!, it seems I am having a similar issue with lightbox.
It's working here:
http://www.kivavisual.com.ar/crissa/index.php/finalizados/...
but not here:
http://www.kivavisual.com.ar/crissa/index.php/finalizados-2/...
Any suggestions?, I made some changes in the view.php code but still cannot understand why is working in one of them, and not in the other.
I've just update to the last version. But I don´t think that would be a problem?.
It's working here:
http://www.kivavisual.com.ar/crissa/index.php/finalizados/...
but not here:
http://www.kivavisual.com.ar/crissa/index.php/finalizados-2/...
Any suggestions?, I made some changes in the view.php code but still cannot understand why is working in one of them, and not in the other.
I've just update to the last version. But I don´t think that would be a problem?.
My problem was that two add-ons were both calling the fancybox function, and they weren't playing nicely together. I looked at your source code and your second version is calling fancybox twice:
crissa/packages/sortable_fancybox_gallery/blocks/sortable_fancybox_gallery/fancybox/jquery.fancybox-1.3.1.pack.js
crissa/packages/amiant_image_gallery/blocks/amiant_gallery/jquery.fancybox-1.3.1.pack.js
I would bet if you followed the same instructions above, it would work for you, too.
crissa/packages/sortable_fancybox_gallery/blocks/sortable_fancybox_gallery/fancybox/jquery.fancybox-1.3.1.pack.js
crissa/packages/amiant_image_gallery/blocks/amiant_gallery/jquery.fancybox-1.3.1.pack.js
I would bet if you followed the same instructions above, it would work for you, too.
Thanks @1db for helping out. I do want to clarify the above steps though: they worked for you because the other block you're using (fancy form template) is on every page of the site, so you can guarantee that it will load the fancybox code.
But @vivavisual has a different situation (I'm guessing) because the other block that is causing the conflict is another image gallery, which is probably not on every page of the site.
There is unfortunately no perfect solution here without writing a bunch of custom code. You may need to just choose one or the other gallery to be on a particular page and not have both on the same page.
I've been talking with some of the other addon authors about a long-term solution to this problem, because it keeps coming up more and more, and I hope that one day we can get something working. But it will probably be a while before that happens.
Sorry, wish I had a better answer :(
But @vivavisual has a different situation (I'm guessing) because the other block that is causing the conflict is another image gallery, which is probably not on every page of the site.
There is unfortunately no perfect solution here without writing a bunch of custom code. You may need to just choose one or the other gallery to be on a particular page and not have both on the same page.
I've been talking with some of the other addon authors about a long-term solution to this problem, because it keeps coming up more and more, and I hope that one day we can get something working. But it will probably be a while before that happens.
Sorry, wish I had a better answer :(
Thanks anyway! I've solved it by uninstalling the other package which was causing me trouble with the sortable fancy box gallery. Now they are both working. I will remember this for the future, and keep investigating.
If you can provide a link to your site (and the specific page with the gallery on it), I can probably give you a more specific diagnosis.
-Jordan