VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: dimi2013 on January 10, 2013, 11:24:07 AM

Title: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: dimi2013 on January 10, 2013, 11:24:07 AM
Hello,
After I updated to 2.0.18a, I can no longer preview a product image in a lightbox. Instead, when I click on the image, it opens up in a new page. Any help would be greatly appreciated. Thank you.
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: jenkinhill on January 10, 2013, 18:44:22 PM
If you are meaning the lightbox effect on the category view page with the products listed then that is working as designed. There is a lightbox effect on the product details image, which is now handled using fancybox instead of facebox so that navigation through more than one product image is possible.

You could add a fancybox code to the category view template and use as an override if you wish to.
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: dimi2013 on January 10, 2013, 21:09:56 PM
Quote from: jenkinhill on January 10, 2013, 18:44:22 PM
There is a lightbox effect on the product details image, which is now handled using fancybox instead of facebox so that navigation through more than one product image is possible. You could add a fancybox code to the category view template and use as an override if you wish to.

Thanks for the reply! I didn't explain my issue well enough. I'm talking about the product details page--where the add to cart button is. When you click on the image it just doesn't come up in a lightbox anymore but opens up in a separate page instead. Do you think I have some kind of conflict?
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: dimi2013 on January 10, 2013, 21:15:28 PM
Ok, now it gets weird. I added more images to a single product details page. When I click on the thumbnails below they open in a nice lightbox. When I click on the "main" image, next to the add to cart button, it opens in a new page.  In addition, the nav buttons are missing. ???
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: wesley888 on January 12, 2013, 03:58:48 AM
I also experienced the same problem even when I at 2.0.16.
A new window will be launched instead of the "usual" pop-up box displaying a larger image of the product selected.
Title: Re: upgrade to 2.018a prevents preview image in lightbox [Solved, but painfully]
Post by: dimi2013 on January 13, 2013, 16:47:09 PM
Ooookay, here we go. First of all, I'm going to say that while I fixed the issues I was having, it took me all day to discover the fix.
Here's what I did:


That's basically it. I now works fine and all the images are popping up in the fancybox including the nav and any extra images and VM's updated to 2.0.18a. I'll post something if I notice anything new. It'd be great if anyone tries this to post of their experiences--I'm very curious to find out if this works for others. Just make sure you use a backup and don't do anything on a live site. ;D
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: knapperalpakka on February 01, 2013, 12:04:34 PM
I have the exact same problem, but I only upgraded from 2.0.18 to 2.0.18a (!). Images worked just fine with 2.0.18, now they open in a new window. Ugly.

I applaud your efforts, but there is no way I'm going to risk going through all that to get something that works right again. Upgrading to v2 was horrible enough.

There must be a simpler solution out there?
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: dimi2013 on February 01, 2013, 12:13:11 PM
QuoteThere must be a simpler solution out there?
From your mouth to God's ear, brother. That'd be nice, especially for future updates/upgrades. On another note, bear in mind that while troubleshooting it took me all day, the actual "fix" took no more than 30 minutes and the site is now on a secure server and live. Anyway, let's see if anyone comes up w/anything, I'm curious.
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: jenkinhill on February 01, 2013, 13:24:54 PM
knapperalpakka issues like this can be very difficult to track down, but can be due to using the VM live updater on a server which is not fast enough or has good connectivity. I suspect this can cause file corruptions, solved by using Joomla's extensions installer to perform updates, installing the main component and the related aio component each time, which is what I always do.
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: knapperalpakka on February 01, 2013, 16:07:02 PM
I just updated the VM installation with the latest package for 2.0.18a and AIO and I have the same problem still. I used the joomla extensions installer for both. Problem can be seen here:
http://www.alpakka.org/alpakkabutikken/gensere/cocoon
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: knapperalpakka on February 01, 2013, 16:15:39 PM
Forgot to mention we're running VM 2.0.18a on Joomla 2.5.8
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: jenkinhill on February 01, 2013, 16:24:30 PM
You have a JavaScript issue - SCRIPT5009: 'jQuery' is undefined for the facebox & fancybox scripts. You must load jQuery before those scripts, but it looks like you have turned off VM jQuery. I assume this is because you are loading two more versions of jQ - but they load after they are required by the fb scripts.

<script src="/modules/mod_we_ufeed_display/colorbox/jquery-1.5.2.min.js" type="text/javascript"></script>
<script src="/templates/knapperalpakkajoomla25template13/jquery.js"></script>

Ideally you should only load one jQuery version, and load it early. Maybe stop the other scripts loading or use jQuery Easy (http://extensions.joomla.org/extensions/core-enhancements/performance/jquery-scripts/18327).

We see a lot of js conflicts with Artisteer templates, which don't seem to follow normal Joomla convention.
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: knapperalpakka on February 01, 2013, 16:54:15 PM
I just turned VM jquery on again. Same thing. I didn't have this problem with VM 2.0.18.

JQuery Easy solved it, sort of. Now VM works, but a slideshow component used elsewhere in joomla doesn't, so I have to add exceptions. But still better than how it was.
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: jenkinhill on February 01, 2013, 18:26:27 PM
The only difference between 2.0.18 and 2.0.18a: The "a" version has a fix if you use an unpublished product as pattern and some people got a problem with the add to cart button.

So both should be the same. But it often seems to me that some site structures load far too much JavaScript.
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: knapperalpakka on February 02, 2013, 00:21:00 AM
I tried one of the templates that came with joomla and had the same problems, so the problem probably comes from a conflict between plugins/addons, i.e. VM and something else. As this is quite a frequent problem with joomla and addons one would think finding a solution within the joomla core would be beneficial to a lot of people. But that's a different discussion. Thanks for the help.
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: jenkinhill on February 02, 2013, 13:57:47 PM
It is possible that the Ultimate Feed Display Module (mod_we_ufeed_display) is the culprit here.
Title: Re: upgrade from 2.0.16 to 2.018a prevents preview image in lightbox
Post by: knapperalpakka on February 02, 2013, 16:27:26 PM
Thought about Ultimate feed. I'll see if I can find a better plugin.