Lightbox Is starting on its own with no target image

101 views Asked by At

I have a website at http://www.landmhighland.com/index.php?main_page=product_info&cPath=41_58&products_id=461

The lightbox script seems to be starting without having clicked on anything, and without any reference image. It only does this on product pages.

Specifically, the overlay is appearing on the page, and the LightboxImage appears to be loading. When the image is clicked on, it redirects to the home page.

It seems to have started after modifying unrelated pages. I am not seeing any JS errors. Any ideas?

1

There are 1 answers

0
AudioBubble On BEST ANSWER

The issue was accidentally including the Lightbox JS and CSS files twice on the page.

Once, in the header, and again on product pages.

It was always included on the product pages as they were the only pages using the lightbox script. I moved it to the header as some other pages were built to use lightboxes. The php file that handles the header was uploaded along with the new pages.

I forgot to upload the updated product page. This caused the live site to have the JS and CSS included twice on the page, with unpredictable and sporadic results.